[1.] SMP user-mode memory inconsistency after pthread_create [2.] Starting with nearly any 2.4 Kernel, on SMP platforms (both Intel and AMD), and SMP-configured Linux kernels, it appears that newly created threads sometimes get an inconsistent view of memory. The enclosed reproducer program is intended to reproduce the problem, but it can sometimes take more than a couple seconds. I have seen reproducible failures on 2.4.2, 2.4.5, 2.4.8, 2.4.9, and 2.4.14. [3.] SMP, pthreads, memory, coherency, 2.4 [4.] 2.4.2, 2.4.5, 2.4.8, 2.4.9, 2.4.14. [5.] (oops not applicable) [6.] See attached .cpp file. [7.] (env not applicable) [7.1.] (output of ver_linux) Linux rho 2.4.14 (root@lih.internal.itasoftware.com) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)) #2 Tue Nov 6 10:44:07 EST 2001 Gnu C 2.96 Gnu make 3.79.1 binutils 2.10.91.0.2-3 util-linux 2.10s-12 mount 2.10r modutils 2.4.2-5 e2fsprogs 1.19-4 Linux C Library 2.2.2-10 Dynamic linker (ldd) 2.2.2 Procps 2.0.7-8 Net-tools 1.57-6 Console-tools 19990829-34 Sh-utils 2.0-13 [7.2.] processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 8 model name : Pentium III (Coppermine) stepping : 6 cpu MHz : 1002.336 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse bogomips : 1998.84 processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 8 model name : Pentium III (Coppermine) stepping : 6 cpu MHz : 1002.336 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse bogomips : 1998.84 [7.3.] (no modules loaded) [7.4.] cat /proc/ioports 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 0376-0376 : ide1 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 0cf8-0cff : PCI conf1 4000-40ff : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] 5000-500f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] 6000-607f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] d000-d00f : VIA Technologies, Inc. Bus Master IDE d000-d007 : ide0 d008-d00f : ide1 d400-d41f : VIA Technologies, Inc. UHCI USB d800-d81f : VIA Technologies, Inc. UHCI USB (#2) dc00-dcff : VIA Technologies, Inc. AC97 Audio Controller e000-e003 : VIA Technologies, Inc. AC97 Audio Controller e400-e403 : VIA Technologies, Inc. AC97 Audio Controller e800-e83f : Intel Corp. 82557 [Ethernet Pro 100] e800-e83f : eepro100 ec00-ec3f : Ensoniq ES1371 [AudioPCI-97] % cat /proc/iomem 00000000-0009fbff : System RAM 0009fc00-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000c8000-000c8fff : Extension ROM 000f0000-000fffff : System ROM 00100000-5ffeffff : System RAM 00100000-002060c3 : Kernel code 002060c4-00254af7 : Kernel data 5fff0000-5fff2fff : ACPI Non-volatile Storage 5fff3000-5fffffff : ACPI Tables d0000000-d7ffffff : VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] d8000000-d9ffffff : PCI Bus #01 d8000000-d9ffffff : Matrox Graphics, Inc. MGA G400 AGP da000000-dcffffff : PCI Bus #01 da000000-da003fff : Matrox Graphics, Inc. MGA G400 AGP db000000-db7fffff : Matrox Graphics, Inc. MGA G400 AGP de000000-de0fffff : Intel Corp. 82557 [Ethernet Pro 100] de100000-de100fff : Intel Corp. 82557 [Ethernet Pro 100] de100000-de100fff : eepro100 fec00000-fec00fff : reserved fee00000-fee00fff : reserved ffff0000-ffffffff : reserved [7.5.] (lspci -vvv) 00:00.0 Host bridge: VIA Technologies, Inc. VT82C691 [Apollo PRO] (rev c4) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Capabilities: [c0] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP] (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset- FastB2B- Capabilities: [80] Power Management version 2 Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 22) Subsystem: VIA Technologies, Inc. VT82C686/A PCI to ISA Bridge Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] [size=1M] Capabilities: [dc] Power Management version 2 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=2 PME- 00:12.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 07) Subsystem: Ensoniq: Unknown device 8001 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- SERR- TAbort- SERR- [disabled] [size=64K] Capabilities: [dc] Power Management version 2 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- Capabilities: [f0] AGP version 2.0 Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2 Command: RQ=31 SBA+ AGP+ 64bit- FW- Rate=x1 [7.6.] (cat /proc/scsi/scsi -- SCSI not configured) [7.7.] no other relevant info -- I have reproduced this bug on several systems, P3, P4, and AMD-MP, various hardware, HIGHMEM 4GIG, or no HIGHMEM support at all. The main thing is that this is SMP-only -- hardware must be SMP, and kernel must be configured for SMP.