mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Failing setjmp of libc-testsuite
Date: Mon, 22 Apr 2013 10:24:38 -0400	[thread overview]
Message-ID: <20130422142437.GO20323@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAE+eE2Jn5gdD_gYpGe=beaiNeAB6CtMfgN_QNrA=kJ1iNm=MPg@mail.gmail.com>

On Mon, Apr 22, 2013 at 04:01:34PM +0300, Timerlan Moldobaev wrote:
> Hi ,
> 
> I am running libc-testsuite  linking it statically with musl libraries
> 
> Here is my gcc  version:
> 
> gcc -v
> Using built-in specs.
> Target: x86_64-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-libgcj-multifile
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
> --enable-java-awt=gtk --disable-dssi --enable-plugin
> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
> --host=x86_64-redhat-linux
> Thread model: posix
> gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)
> 
> I noticed that setjmp test constantly fails for me with the following error
> message:
> 
> setjmp.c:51: sigismember(&set, 10)==0 failed: siglongjmp failed to restore
> mask
> setjmp test failed, 1 error(s)
> 
> However if I comment out all the rest functions calls from testsuite.c file
> , setjmp alone surprisingly passes as if its failure is somehow connected
> to other tests. Specifically memstream is the one that affects
> success/failure of setjmp.
> 
> Please see attached output of strace -v -s 512 -F -f -o out_fail.txt
> ../testsuite ( a failing case when only  memstream and setjmp  are present
> in testsuite.c file ) and strace -v -s 512 -F -f -o out.txt ./testsuite ( a
> success case when only setjmp  is present in  testsuite.c file).
> 
> Any ideas why the failure happens ?
> 
> Thanks,
> Tim.

> 26978 rt_sigprocmask(SIG_UNBLOCK, [USR1], [], 8) = 0
> 26978 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> 26978 rt_sigprocmask(SIG_BLOCK, [USR1], NULL, 8) = 0
> 26978 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> 26978 rt_sigprocmask(SIG_SETMASK, [], [], 8) = 0
> 26978 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x100, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x803b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
> 26978 writev(1, [{"setjmp", 6}, {" test passed\n", 13}], 2) = 19
> 26978 writev(1, [{"", 0}, {"\n", 1}], 2) = 1
> 26978 writev(1, [{"total errors: 0", 15}, {"\n", 1}], 2) = 16
> 26978 exit_group(0)                     = ?

> 5433  brk(0)                            = 0xb371000
> 5433  brk(0xb372000)                    = 0xb372000
> 5433  ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x100, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x803b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
> 5433  writev(1, [{"memstream", 9}, {" test passed\n", 13}], 2) = 22
> 5433  rt_sigprocmask(SIG_UNBLOCK, [USR1], [], 8) = 0
> 5433  rt_sigprocmask(SIG_SETMASK, [QUIT ILL ABRT BUS USR1 SEGV ALRM STKFLT URG], NULL, 8) = 0
> 5433  rt_sigprocmask(SIG_BLOCK, [USR1], NULL, 8) = 0
> 5433  rt_sigprocmask(SIG_SETMASK, [QUIT ILL ABRT BUS USR1 SEGV ALRM STKFLT URG], NULL, 8) = 0
> 5433  rt_sigprocmask(SIG_SETMASK, [], [QUIT ILL ABRT BUS USR1 SEGV ALRM STKFLT URG], 8) = 0
> 5433  writev(1, [{"setjmp.c:51: sigismember(&set, 10)==0 failed: siglongjmp failed to restore mask", 79}, {"\n", 1}], 2) = 80
> 5433  writev(1, [{"setjmp test failed, 1", 21}, {" error(s)\n", 10}], 2) = 31
> 5433  writev(1, [{"", 0}, {"\n", 1}], 2) = 1
> 5433  writev(1, [{"total errors: 1", 15}, {"\n", 1}], 2) = 16
> 5433  exit_group(1)                     = ?

I just committed a fix; let me know if your problem persists. I also
committed an improvement to the testsuite, which you might want to try
first, which should reliably detect the error you found in musl.

Thanks!

Rich


  reply	other threads:[~2013-04-22 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 13:01 Timerlan Moldobaev
2013-04-22 14:24 ` Rich Felker [this message]
2013-04-23  9:22   ` Timerlan Moldobaev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130422142437.GO20323@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).