This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[wtjones@widowmaker.com] libc/836: There appears to be a bug in the sigmask handling in Linuxthreads.



Here's another bug report which I don't know how to handle.  The
information is to vague to reproduce it - but has anybody an idea what 
might be the problem?

Uli, you write in the FAQ:
} 2.23.   When I use nscd the machine freezes.
} 
} {UD} It is well known that you cannot use nscd with Linux 2.0.*.  There
} is functionality missing in the kernel and work-arounds are not suitable.
} Beside this some parts of the kernel are too buggy when it comes to using
} threads.
} 
} So you have the possibilities to run Linux 2.0.* or update to a higher
} version and start using nscd.

Might it be that the bug is a bug of Linux 2.0.35 and not of
glibc/linuxthreads?

Andreas

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de



>Number:         836
>Category:       libc
>Synopsis:       There appears to be a bug in the sigmask handling in Linuxthreads.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Sun Oct 25 20:50:01 EST 1998
>Last-Modified:
>Originator:     wtjones@widowmaker.com
>Organization:
net
>Release:        glibc-2.0.7-19
>Environment:
Red Hat Linux release 5.1 (Manhattan)
Kernel 2.0.35 on an alpha
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
>Description:
Running mySQL version 3.22.9-beta database server (http://www.tcx.se) on alpha
under Red Hat Linux 5.1.  Server randomly "locks up".  Response from mySQL
developer and output from gdb follows:

  It dies in the following command:

   pthread_sigmask(SIG_SETMASK,&old_mask,NULL);

  This means that there is a bug in the sigmask handling in Linuxthreads 
  on Alpha Linux.  Can you forward a bug about this to some Alpha-linux
  developer!

  William>    #3  0x1200f0f40 in thr_alarm (alrm=0x11ffff368, sec=28800) at
  William> thr_alarm.c:163
  William>    163       pthread_sigmask(SIG_SETMASK,&old_mask,NULL);
  William>    (gdb) info locals
  William>    alarm_data = (ALARM *) 0x1202e47d8
  William>    now = 909193289
  William>    old_mask = {__val = {537018373, 0 <repeats 15 times>}}
  William>    reschedule = 1 '\001'
  William>    _db_func_ = 0x0
  William>    _db_file_ = 0x0
  William>    _db_level_ = 536869952
  William>    _db_framep_ = (char **) 0x100000000

  The above shows that 'old_mask' is ok and this isn't a bug in the call!

  The bug probably happens when one changes the signal mask at the same
  time the master thread handles a signal (wild guess).

I thought this might be related to
"PR number 798...Possible pthreads bug with glibc-2.0.7"

Thanks in advance,

wtj
>How-To-Repeat:
Build mySQL 3.22.9-beta on alpha as follows:

`CC=gcc CFLAGS="-fomit-frame-pointer" CXX=gcc CXXFLAGS="-fomit-frame-pointer -fel
ide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysq
l --with-mysqld-ldflags=-all-static --with-debug`

Debug as...

  %gdb libexec/mysqld
  (gdb)run --one-thread
  Starting program: ./sql/mysqld --one-thread

  Program received signal SIGUSR1, User defined signal 1.
  __sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
  ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42: No such file or directory.
  Current language:  auto; currently asm
  (gdb) c
  Continuing.

  Program received signal SIGUSR1, User defined signal 1.
  __sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
  ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42: No such file or directory.
  (gdb) c
  Continuing.
  ./sql/mysqld: ready for connections

Now, in another shell, repeatedly execute
`bench/run-all-tests --lock-tables --small-test` until gdb says...

  Program received signal SIGSEGV, Segmentation fault.
  0x120139408 in __osf_sigprocmask () at __osf_sigprocmask:2
  __osf_sigprocmask:2: No such file or directory.
  (gdb) bt
  #0  0x120139408 in __osf_sigprocmask () at __osf_sigprocmask:2
  #1  0x120117240 in __sigprocmask (how=3, set=0x20024005, oset=0x0)
      at ../sysdeps/unix/sysv/linux/alpha/sigprocmask.c:43
  #2  0x12011214c in pthread_sigmask (how=3, newmask=0x20024005, oldmask=0x0)
      at signals.c:45
  #3  0x1200f2180 in thr_alarm (alrm=0x11ffff418, sec=3) at thr_alarm.c:163
  #4  0x120045548 in my_real_read (net=0x1202e4020, complen=0x11ffff450)
      at net_serv.c:460
  #5  0x120045ad4 in my_net_read (net=0x1202e4020) at net_serv.c:576
  #6  0x120054b94 in check_connections ()
  #7  0x1200553e0 in handle_one_connection ()
  #8  0x12004e5f0 in create_new_thread ()
  #9  0x12004f088 in handle_connections_sockets ()
  #10 0x12004e118 in main ()
  (gdb)

May take as many as six executions of `run-all-tests...` but it WILL FAIL
>Fix:
>Audit-Trail:
>Unformatted:




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]