When ran on ARC, these tests would ocassionally fail
| [ARCLinux]# for i in 1 2 3 4 5 ; do ./tst-cancel2; echo $?; done
| write succeeded
| result is wrong: expected 0xffffffff, got 0x1
| 1 <-- fail
| 0 <-- pass
| 0 <--- pass
| 0 <-- pass
| write succeeded
| result is wrong: expected 0xffffffff, got 0x1
| 1 <-- fail
Same test (which originated form glibc) doesn't fail in glibc builds.
Turns out there's a subtle race in uclibc version
The test creates a new thread, makes it do a looong write call, and
parent then cancels the thread, expecting it to unwind out of write
call cleanly. However the write (even for 10k bytes) could fnish befor
eparent gets a chance ti run and/or cancel - causing the occasional
failire.
Cc: Cupertino Miranda <cmiranda(a)synopsys.com>
Fix this subtelty by making it write not just once but forever.
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
---
test/nptl/tst-cancel2.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/test/nptl/tst-cancel2.c b/test/nptl/tst-cancel2.c
index 45c9e8ea957a..08dd13b10f37 100644
--- a/test/nptl/tst-cancel2.c
+++ b/test/nptl/tst-cancel2.c
@@ -32,11 +32,7 @@ tf (void *arg)
write blocks. */
char buf[100000];
- if (write (fd[1], buf, sizeof (buf)) == sizeof (buf))
- {
- puts ("write succeeded");
- return (void *) 1l;
- }
+ while (write (fd[1], buf, sizeof (buf)) > 0);
return (void *) 42l;
}
--
2.7.4
Hi Waldemar,
I've recently encountered an issue with broken posix_spawn in uClibc-ng
1.0.26, which made cups 2.2.[46] unusable. Looking at commit
71b3a63b641716165f664cf112be0673a122cea0, I see that it should be fixed in
1.0.27. I have a small test code that illustrates the problem with
posix_spawn, which works fine with GNU lib C, but fails with uClibc-ng
1.0.26 (see posix_spawn.c attached). If I remove POSIX_SPAWN_SETSIGDEF
flag, it works OK. I can't test it with 1.0.27 yet, could you please verify
that it works?
Also, if it works fine, another question. What is the proper macro test for
working posix_spawn (uClibc-ng version 1.0.27+)?
Thank you,
Alex
Hi Alexey,
the attached patch fixes at least 3 test suite errors for me.
tst-cancel20/21/4.
Tested with latest 2017.09 ARC binutils/gcc.
Okay to apply?
best regards
Waldemar
Similar to the thread regarding build failures w/ DO_XSI_MATH disabled, I think
there is another breakage with the new FENV bits that were added by commit
ea38f4d89c96, which when built natively on an existing uclibc-ng-1.0.26 chroot
yield these failures:
LD libuClibc-0.1.0.27.so
libc/libc_so.a(w_acos.os): In function `__GI_acos':
w_acos.c:(.text+0x74): undefined reference to `feraiseexcept'
libc/libc_so.a(k_standardl.os): In function `__kernel_standard_l':
k_standardl.c:(.text+0x10): undefined reference to `feholdexcept'
k_standardl.c:(.text+0x70): undefined reference to `fesetenv'
collect2: error: ld returned 1 exit status
make: *** [libc/Makefile.in:77: lib/libc.so] Error 1
I am not sure why these symbols go missing. Possibly something related to
kernel headers? My chroot environment has kernel headers from 4.13 installed,
so I am thinking this isn't the issue. I have both DO_C99_MATH and DO_XSI_MATH
enabled, using legacy NAN (not 2008), and various other glibc-compatibility
tweaks enabled. uclibc-ng-1.0.26 built fine -- the only real issue there was
my previously-reported xfsprogs build failure.
I also read earlier that it is considered uncommon to build uclibc-ng natively.
I'd like to call that into question and recommend that native builds be tested
in some capacity before new releases are made. An existing environment should
be capable of upgrading itself.
--
Joshua Kinard
Gentoo/MIPS
kumba(a)gentoo.org
6144R/F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
"The past tempts us, the present confuses us, the future frightens us. And our
lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Hi,
just tried updating to uclibc-ng 1.0.27 and now I get the following
during build:
build-for-target/libc/libc_so.a(w_j0.os): In function `j0':
./uclibc-ng/libm/w_j0.c:34: undefined reference to `__ieee754_j0'
build-for-target/libc/libc_so.a(w_j0.os): In function `y0':
./uclibc-ng/libm/w_j0.c:62: undefined reference to `__ieee754_y0'
build-for-target/libc/libc_so.a(w_j0f.os): In function `y0f':
./uclibc-ng/libm/w_j0f.c:66: undefined reference to `__ieee754_y0f'
build-for-target/libc/libc_so.a(w_j1.os): In function `j1':
./uclibc-ng/libm/w_j1.c:35: undefined reference to `__ieee754_j1'
build-for-target/libc/libc_so.a(w_j1.os): In function `y1':
./uclibc-ng/libm/w_j1.c:63: undefined reference to `__ieee754_y1'
build-for-target/libc/libc_so.a(w_jn.os): In function `jn':
./uclibc-ng/libm/w_jn.c:34: undefined reference to `__ieee754_jn'
build-for-target/libc/libc_so.a(w_jn.os): In function `yn':
./uclibc-ng/libm/w_jn.c:62: undefined reference to `__ieee754_yn'
This is because I have DO_XSI_MATH disabled and commit
ea38f4d89c9698895b1cf53a5946429dc1d8bbaa added a lot of files to compile
unconditionally that use functions only enabled with DO_XSI_MATH.
- ron
PS: I'm not on the list, please Cc: me when answering.
--
Raritan Deutschland GmbH, Kornmarkt 7, 08056 Zwickau, Germany
Amtsgericht Chemnitz HRB 23605, Geschäftsführung: Ralf Ploenes
________________________________
Ce message, ainsi que tous les fichiers joints à ce message, peuvent contenir des informations sensibles et/ ou confidentielles ne devant pas être divulguées. Si vous n'êtes pas le destinataire de ce message (ou que vous recevez ce message par erreur), nous vous remercions de le notifier immédiatement à son expéditeur, et de détruire ce message. Toute copie, divulgation, modification, utilisation ou diffusion, non autorisée, directe ou indirecte, de tout ou partie de ce message, est strictement interdite.
This e-mail, and any document attached hereby, may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized, direct or indirect, copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.
It is supported both in the sense of being contained in mips version
of statfs/statfs64 structs and also in the sense that it's filled by
the corresponding kernel syscalls.
It is UNsupported in that sense that it's value is the same as that
of f_bsize (at least on older kernel versions, the oldest version
tested is 2.6.13), s. [1] and [2] for details ([1] is the latest
kernel version as of now, [2] is the oldest kernel version git
history is available for).
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tre…
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tre…
Follow-up of 68de9946e914d8c30dcc6667a059ea59e5b74cac
Signed-off-by: Eugene Rudoy <gene.devel(a)gmail.com>
Signed-off-by: Ralf Friedl <Ralf.Friedl(a)online.de>
---
libc/sysdeps/linux/mips/bits/statfs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/sysdeps/linux/mips/bits/statfs.h b/libc/sysdeps/linux/mips/bits/statfs.h
index 673120d1a..baa964532 100644
--- a/libc/sysdeps/linux/mips/bits/statfs.h
+++ b/libc/sysdeps/linux/mips/bits/statfs.h
@@ -26,7 +26,7 @@ struct statfs
long int f_type;
#define f_fstyp f_type
long int f_bsize;
- long int f_frsize; /* Fragment size - unsupported */
+ long int f_frsize;
#ifndef __USE_FILE_OFFSET64
__fsblkcnt_t f_blocks;
__fsblkcnt_t f_bfree;
@@ -53,7 +53,7 @@ struct statfs64
long int f_type;
#define f_fstyp f_type
long int f_bsize;
- long int f_frsize; /* Fragment size - unsupported */
+ long int f_frsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_files;
--
2.14.2
I ran into a build failure on xfsprogs-4.13.1 under uclibc-ng-1.0.26 due to it
not finding the 'f_flags' member in 'struct statfs'. Glibc has this member,
but not uclibc-ng. Is this something going away, something yet to be added, or
something controlled by a CONFIG_* directive?
This is a diff of /usr/include/bits/statfs.h from a glibc root (a/) and a
uclibc-ng root (b/):
--- a/usr/include/bits/statfs.h 2017-10-14 18:15:40.672366000 -0400
+++ b/usr/include/bits/statfs.h 2017-11-01 13:34:08.335874000 -0400
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
+ License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_STATFS_H
@@ -44,8 +44,7 @@ struct statfs
/* Linux specials */
__fsid_t f_fsid;
long int f_namelen;
- long int f_flags;
- long int f_spare[5];
+ long int f_spare[6];
};
#ifdef __USE_LARGEFILE64
@@ -64,8 +63,7 @@ struct statfs64
/* Linux specials */
__fsid_t f_fsid;
long int f_namelen;
- long int f_flags;
- long int f_spare[5];
+ long int f_spare[6];
};
#endif
--
Joshua Kinard
Gentoo/MIPS
kumba(a)gentoo.org
6144R/F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
"The past tempts us, the present confuses us, the future frightens us. And our
lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Hi,
I released uClibc-ng 1.0.27 yesterday.
It adds support for c-sky architecture.
Many thanks to Guo Ren!
Furthermore it contains a lot of or1k NPTL bugfixes,
which reduces the seen test failures running the uClibc-ng
testsuite inside Qemu a lot.
Many thanks to Stafford Horne!
And a lot of other bugfixes.
Thanks to the many new contributors!
best regards
Waldemar