(readding ML) > -----Original Message----- > From: Philippe Gerum <r...@xenomai.org> > Sent: Dienstag, 14. Mai 2019 10:38 > To: Lange Norbert <norbert.la...@andritz.com> > Subject: Re: [PATCH] lib/cobalt: init: do not call pthread_atfork() from > atfork() handlers > > E-MAIL FROM A NON-ANDRITZ SOURCE: AS A SECURITY MEASURE, PLEASE > EXERCISE CAUTION WITH E-MAIL CONTENT AND ANY LINKS OR > ATTACHMENTS. > > > On 5/14/19 10:35 AM, Philippe Gerum wrote: > > On 5/6/19 9:56 AM, Lange Norbert wrote: > >> Hello Philippe, > >> > >> using this patch, smokey's "fork test" alone finishes, but.. > >> the smokey suite will hang when running that test after the mutex or > >> cvars test. Eg. > >> > >> smokey --run=10,11 > >> smokey --run=12,11 > > > > I cannot reproduce this with glibc 2.28, and the tip of my > > for-upstream tree which includes that fix. Which glibc are you running?
Glibc 2.28, Xenomai userspace is based on current master branch with fix added (tested both with and without our company stuff on top) > > Is this the sequence which hangs on your end? > > ~ # smokey --run=13-14 > posix_cond OK > posix_fork OK > ~ # smokey --run=15-14 > posix_mutex OK > posix_fork OK > Yes: root@buildroot:~# /usr/xenomai/bin/smokey --run=10 posix_mutex OK root@buildroot:~# /usr/xenomai/bin/smokey --run=11 posix_fork OK root@buildroot:~# /usr/xenomai/bin/smokey --run=10,11 posix_mutex OK When it hangs, this is the stacktrace: (switched to crosstool-NG for the toolchain, did not check to enable debuginfo for glibc). (gdb) bt #0 0x00007f45b4d86feb in ?? () from /lib64/libc.so.6 #1 0x00007f45b4de8b95 in malloc () from /lib64/libc.so.6 #2 0x00007f45b4f81a53 in ?? () from /lib64/ld-linux-x86-64.so.2 #3 0x00007f45b4f83149 in ?? () from /lib64/ld-linux-x86-64.so.2 #4 0x00007f45b4f8d4cc in ?? () from /lib64/ld-linux-x86-64.so.2 #5 0x00007f45b4ea7bcf in _dl_catch_exception () from /lib64/libc.so.6 #6 0x00007f45b4f8d0bb in ?? () from /lib64/ld-linux-x86-64.so.2 #7 0x00007f45b4ea71a3 in ?? () from /lib64/libc.so.6 #8 0x00007f45b4ea7bcf in _dl_catch_exception () from /lib64/libc.so.6 #9 0x00007f45b4ea7c40 in _dl_catch_error () from /lib64/libc.so.6 #10 0x00007f45b4ea72a8 in ?? () from /lib64/libc.so.6 #11 0x00007f45b4ea7317 in __libc_dlopen_mode () from /lib64/libc.so.6 #12 0x00007f45b4dacfa5 in ?? () from /lib64/libc.so.6 #13 0x00007f45b4f2051f in ?? () from /lib64/libpthread.so.0 #14 0x00007f45b4e7ca84 in backtrace () from /lib64/libc.so.6 #15 0x00007f45b4f4960c in cobalt_sigshadow_handler (sig=<optimized out>, si=<optimized out>, ctxt=<optimized out>) at /tmp/tmp.cTCUJSMLNc/xeno/lib/cobalt/sigshadow.c:55 #16 0x00007f45b4f4965d in sigshadow_handler (sig=28, si=0x7ffcd1fb45f0, ctxt=0x7ffcd1fb44c0) at /tmp/tmp.cTCUJSMLNc/xeno/lib/cobalt/sigshadow.c:80 #17 <signal handler called> #18 0x00007f45b4e6b242 in mmap64 () from /lib64/libc.so.6 #19 0x00007f45b4de6a3c in ?? () from /lib64/libc.so.6 #20 0x00007f45b4de775c in ?? () from /lib64/libc.so.6 #21 0x00007f45b4de8ba7 in malloc () from /lib64/libc.so.6 #22 0x00007f45b4f66754 in heapobj_pkg_init_private () at /tmp/tmp.cTCUJSMLNc/xeno/lib/copperplate/heapobj-heapmem.c:102 #23 0x00007f45b4f62f17 in copperplate_init () at /tmp/tmp.cTCUJSMLNc/xeno/lib/copperplate/init.c:199 #24 0x00007f45b4f4d6b0 in __xenomai_init (argcp=argcp@entry=0x7ffcd1fb4e44, argvp=argvp@entry=0x7ffcd1fb4e48, me=me@entry=0x7f45b4f53f29 "program") at /tmp/tmp.cTCUJSMLNc/xeno/lib/boilerplate/setup.c:630 #25 0x00007f45b4f4dcac in xenomai_init (argcp=0x7ffcd1fb4e44, argvp=0x7ffcd1fb4e48) at /tmp/tmp.cTCUJSMLNc/xeno/lib/boilerplate/setup.c:685 #26 0x0000000000405177 in ?? () #27 0x000000000041ae7d in ?? () #28 0x00007f45b4d8740b in __libc_start_main () from /lib64/libc.so.6 #29 0x000000000040544a in ?? () Regards, Norbert PS. Could you please have a look at this aswell: https://www.xenomai.org/pipermail/xenomai/2019-March/040572.html (Its unrelated, but come back to my mind as I looked at some of my private commits not upstreamed) ________________________________ This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 Thank You ________________________________