Skip to contentSkip to conversation

glibc-2.3.2 NPTL caveat

DISCUSSION David Mosberger 2 participants 4 messages Jan 20, 2005 – Jan 24, 2005

lore
Share & tools
lore
#0 lore raw

We just discovered a nasty bug in glibc-2.3.2 which can lead to "random" memory corruption in multi-threaded applications using NPTL. This definitely affects Debian/{testing,unstable}, but it may affect other distros as well. I also believe that the CVS glibc still has this bug, so I suspect it's not just glibc-2.3.2 that's affected.

For details, see:

http://sources.redhat.com/bugzilla/show_bug.cgi?idh5

	--david
#1 lore raw
Quoted 9 lines · David Mosberger

We just discovered a nasty bug in glibc-2.3.2 which can lead to "random" memory corruption in multi-threaded applications using NPTL. This definitely affects Debian/{testing,unstable}, but it may affect other distros as well. I also believe that the CVS glibc still has this bug, so I suspect it's not just glibc-2.3.2 that's affected.

For details, see:

http://sources.redhat.com/bugzilla/show_bug.cgi?idh5

That explains a lot of problems we had with MySQL crashing almost instantly on startup on IA64 machines too. So what needs to be done? Is it as simple a fix as always compiling ld-linux with the larger of the two thread struct sizes? (he says, extremely naively, since this is the sort of thing in Linux that he has no clue about whatsoever - it comes under the heading of "scary stuff you leave to Really Clever People to think about" :-)

Tim

Signature · 3 lines
Dr Tim Cutts
Informatics Systems Group, Wellcome Trust Sanger Institute
GPG: 1024D/E3134233 FE3D 6C73 BBD6 726A A3F5  860B 3CDD 3F56 E313 4233
#2 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tim Cutts

Tim> That explains a lot of problems we had with MySQL crashing Tim> almost instantly on startup on IA64 machines too. So what Tim> needs to be done? Is it as simple a fix as always compiling Tim> ld-linux with the larger of the two thread struct sizes? (he Tim> says, extremely naively, since this is the sort of thing in Tim> Linux that he has no clue about whatsoever - it comes under the Tim> heading of "scary stuff you leave to Really Clever People to Tim> think about" :-)

I _think_ the correct fix is to ask the thread-library what the correct offset/size is, but I'm unsure if the infrastructure needed to do so is already there.

	--david
#3 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tim Cutts

Tim> That explains a lot of problems we had with MySQL crashing Tim> almost instantly on startup on IA64 machines too.

Hmmh, was this problem reported somewhere?

Tim> So what needs to be done?

If you run on Debian, the easiest workaround for now is probably to invoke the program via /lib/tls/ld-linux-ia64.so.2.

Of course, you could also force the use of the LinuxThread-based libc by setting environment variable LD_ASSUME_KERNEL to 2.4.18, but if you want NPTL, that's not a useable solution.

	--david