Re: let's use a fixed number of threads for libpager
On Tue, Oct 28, 2014 at 01:37:43AM +0100, Justus Winter wrote: Preliminary testing on my box as well as on darnassus looks promising (modulo some pfinet weirdness that Richard is investigating [and imho if there is an issue, it should be unrelated to this change]). We will keep you posted. It looks like a netdde-specific problem. Perhaps a small mistake with regard to the static library it includes. Other than that, the patch looks good, and I'm very, very happy to finally see something like this land in libpager. -- Richard Braun
Re: let's use a fixed number of threads for libpager
On Tue, Oct 28, 2014 at 01:37:43AM +0100, Justus Winter wrote: Preliminary testing on my box as well as on darnassus looks promising (modulo some pfinet weirdness that Richard is investigating [and imho if there is an issue, it should be unrelated to this change]). We will keep you posted. Stressing the file system (by building a large package such as iceweasel) triggers a reference counting assertion [1]. We'll have to squash this bug hard before the patch can be merged. -- Richard Braun [1] https://www.gnu.org/software/hurd/open_issues/ext2fs_libports_reference_counting_assertion.html
Re: Release process rolling new releases
Hello :) Quoting Samuel Thibault (2014-10-06 11:30:26) Thomas Schwinge, le Mon 06 Oct 2014 11:22:50 +0200, a écrit : So, anything specific that we should wait for before bundling the next release snapshots? It'd be nice to include the init-startup series after review. (I'm OK with the principle, we need to review the patch, and get the glibc ack from Roland) It has been a month since I posted the change, and two weeks since I pointed Roland to this patch series. I say we don't need his ok, since I didn't break the old way the libc gets a handle to the startup server. Looking up the message port still works (I'd like to change that, but that can wait). The only thing that's changed is the pid. I'm sure Roland is okay with updating the 1 to a 2. Justus
Re: let's use a fixed number of threads for libpager
Quoting Richard Braun (2014-10-28 17:59:16) On Tue, Oct 28, 2014 at 01:37:43AM +0100, Justus Winter wrote: Preliminary testing on my box as well as on darnassus looks promising (modulo some pfinet weirdness that Richard is investigating [and imho if there is an issue, it should be unrelated to this change]). We will keep you posted. Stressing the file system (by building a large package such as iceweasel) triggers a reference counting assertion [1]. We'll have to squash this bug hard before the patch can be merged. [1] https://www.gnu.org/software/hurd/open_issues/ext2fs_libports_reference_counting_assertion.html It just so happens that I have a backtrace-on-assertion-failure patch in my tree: [...] dpkg-source: info: extracting mig in mig-1.4 dpkg-source: info: unpacking mig_1.4.orig.tar.bz2 ext2fs/ext2fs_t: ../include/refcount.h:159: refcounts_ref: Assertion `! (r.hard == 1 r.weak == 0) || !refcount detected use-after-free!' failed. /home/teythoon/build/hurd-upstream/lib/libdiskfs.so.0.3(diskfs_S_dir_lookup+0x389)[0x1093869] /home/teythoon/build/hurd-upstream/lib/libdiskfs.so.0.3(+0x10636)[0x1099636] /home/teythoon/build/hurd-upstream/lib/libdiskfs.so.0.3(diskfs_demuxer+0x97)[0x1092a87] /home/teythoon/build/hurd-upstream/lib/libports.so.0.3(+0x39ae)[0x10e69ae] /lib/i386-gnu/libc.so.0.3(mach_msg_server_timeout+0xb6)[0x111f886] /home/teythoon/build/hurd-upstream/lib/libports.so.0.3(+0x3b2e)[0x10e6b2e] /lib/i386-gnu/libpthread.so.0.3(+0x4b06)[0x104db06] tar: mig-1.4/build-aux: Cannot utime: Computer bought the farm tar: mig-1.4/INSTALL: Cannot open: Computer bought the farm tar: mig-1.4/AUTHORS: Cannot open: Computer bought the farm [...] This is just a stupid demo of course, I put that refcount bug in there. I'll put that patch in my package and you can give it a try on darnassus. Justus
[PATCH hurd 2/2] include: use assert-backtrace.h in refcount.h
* include/refcount.h: Use assert-backtrace.h. --- include/refcount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/refcount.h b/include/refcount.h index ebde42d..5bb9660 100644 --- a/include/refcount.h +++ b/include/refcount.h @@ -22,7 +22,7 @@ #ifndef _HURD_REFCOUNT_H_ #define _HURD_REFCOUNT_H_ -#include assert.h +#include assert-backtrace.h #include limits.h #include stdint.h -- 2.1.1
backtrace on assertion failure
Hello, for reference, here is the patch. I'm not sure how to properly integrate this. Justus
[PATCH hurd 1/2] libshouldbeinlibc: add assert.h variant that prints backtraces
* libshouldbeinlibc/assert-backtrace.h: New file. * libshouldbeinlibc/Makefile (installhdrs): Add assert-backtrace.h. --- libshouldbeinlibc/Makefile | 4 ++- libshouldbeinlibc/assert-backtrace.h | 68 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 libshouldbeinlibc/assert-backtrace.h diff --git a/libshouldbeinlibc/Makefile b/libshouldbeinlibc/Makefile index 14a7939..b32e1bd 100644 --- a/libshouldbeinlibc/Makefile +++ b/libshouldbeinlibc/Makefile @@ -29,7 +29,9 @@ SRCS = termsize.c timefmt.c exec-reauth.c maptime-funcs.c \ ugids-auth.c ugids-xinl.c ugids-merge.c ugids-imply.c ugids-posix.c \ ugids-verify-auth.c nullauth.c installhdrs = idvec.h timefmt.h maptime.h \ - wire.h portinfo.h portxlate.h cacheq.h ugids.h nullauth.h + wire.h portinfo.h portxlate.h cacheq.h ugids.h nullauth.h \ + assert-backtrace.h \ + installhdrsubdir = . OBJS = $(SRCS:.c=.o) diff --git a/libshouldbeinlibc/assert-backtrace.h b/libshouldbeinlibc/assert-backtrace.h new file mode 100644 index 000..7baf4b3 --- /dev/null +++ b/libshouldbeinlibc/assert-backtrace.h @@ -0,0 +1,68 @@ +/* Augment failing assertions with backtraces. + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the GNU Hurd. If not, see http://www.gnu.org/licenses/. */ + +#ifndef __ASSERT_BACKTRACE__ +#define __ASSERT_BACKTRACE__ + +#ifndef NDEBUG + +#include assert.h +#include errno.h +#include execinfo.h +#include stdio.h +#include unistd.h + +/* This prints an Assertion failed message and aborts. */ +static void __assert_fail_backtrace (const char *__assertion, + const char *__file, + unsigned int __line, + const char *__function) + __attribute__ ((noreturn, unused)); + +#undef assert +#define assert(expr) \ + ((expr) \ + ? __ASSERT_VOID_CAST (0)\ + : __assert_fail_backtrace (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) + +static inline void +__assert_fail_backtrace (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) +{ +#define SIZE 128 +#define SKIP 1 + int nptrs; + void *buffer[SIZE]; + + error (0, 0, %s:%d: %s: Assertion `%s' failed., + __file, __line, __function, __assertion); + + nptrs = backtrace(buffer, SIZE); + if (nptrs == 0) +error (1, errno, backtrace); + + backtrace_symbols_fd (buffer[SKIP], nptrs - SKIP, STDERR_FILENO); + fflush (stderr); + exit (EXIT_FAILURE); +#undef SKIP +#undef SIZE +} + +#endif /* NDEBUG */ +#endif /* __ASSERT_BACKTRACE__ */ -- 2.1.1
zeromq3: ssh freeze by running a test program twice (or once and removing the created socket)
Source: zeromq3 Version: 4.0.5+dfsg-2 Severity: Important Tags: patch User: debian-h...@lists.debian.org Usertags: hurd Attached are patches for adding GNU/Hurd to the list of supported architectures for zeromq3. I have tried bot the select and poll versions, same result. Libraries needed to run the dynamically linked lt-test_regrep_ipc excutable are: libzmq.so.3.1.0 (not included here 3.2 MiB), libpgm-5.1-0 and libsodium13. Failing test programs are test_abstract_ipc, test_pair_ipc, test_reqrep_ipc, the first should exit with an assertion, the other two due to a missing implementation of option SO_ERROR for getsockopt. The attached test program makes sshd (all ssh connections) freeze hard, either by running twice, or once and then removing the created socket /tmp/tester. Breaking the ssh connection(s) and logging in again, everything works normally. rpctrace shows that the failure happens at unlink: 110--141(pid1186)-dir_lookup (tmp 0 0) = 0 1 freeze here 183--185(pid1186)-dir_unlink (tester) = 0 More rpctrace data is at: http://paste.debian.net/129009/ (as long as it stays there, 24 hours?) Building the package (and running the testsuite) hangs even if the patch adds XFAIL for the three failing tests. Logging in via ssh and building creates the freeze above, and building in the Hurd console of qemu results in a translator dying: Resource lost. Debugging with gdb is fine until the function __dir_unlink RPC_dir_unlink.c is called, which hangs. Doing the same on another (ordinary file) in /tmp follows the same path (and __dir_unlink succeeds). The problems are probably created before the RPC call?? Any further ideas or pointers are welcome. Thanks! Index: zeromq3-4.0.5+dfsg/configure.ac === --- zeromq3-4.0.5+dfsg.orig/configure.ac +++ zeromq3-4.0.5+dfsg/configure.ac @@ -115,6 +115,7 @@ libzmq_dso_visibility=yes libzmq_on_mingw32=no libzmq_on_android=no libzmq_on_linux=no +libzmq_on_gnu=no # Set some default features required by 0MQ code. CPPFLAGS=-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS @@ -249,6 +250,17 @@ case ${host_os} in AC_MSG_ERROR([Building static libraries is not supported under Cygwin]) fi ;; +gnu*) +# Define on GNU/Hurd to enable all library features. Define if using a gnu compiler +if test x$GXX = xyes; then +CPPFLAGS=-D_GNU_SOURCE $CPPFLAGS +fi +AC_DEFINE(ZMQ_HAVE_GNU, 1, [Have GNU/Hurd OS]) +libzmq_on_gnu=yes + AC_CHECK_LIB(rt, sem_init) +AC_CHECK_LIB(uuid, uuid_generate, , +[AC_MSG_ERROR([cannot link with -luuid, install uuid-dev.])]) +;; *) AC_MSG_ERROR([unsupported system: ${host_os}.]) ;; @@ -431,6 +443,7 @@ AM_CONDITIONAL(BUILD_PGM, test x$libzmq AM_CONDITIONAL(ON_MINGW, test x$libzmq_on_mingw32 = xyes) AM_CONDITIONAL(ON_ANDROID, test x$libzmq_on_android = xyes) AM_CONDITIONAL(ON_LINUX, test x$libzmq_on_linux = xyes) +AM_CONDITIONAL(ON_GNU, test x$libzmq_on_gnu = xyes) # Checks for library functions. AC_TYPE_SIGNAL Index: zeromq3-4.0.5+dfsg/src/poller.hpp === --- zeromq3-4.0.5+dfsg.orig/src/poller.hpp +++ zeromq3-4.0.5+dfsg/src/poller.hpp @@ -73,6 +73,13 @@ #elif defined ZMQ_HAVE_CYGWIN #define ZMQ_USE_SELECT #include select.hpp +#elif defined ZMQ_HAVE_GNU +/* +#define ZMQ_USE_SELECT +#include select.hpp +*/ +#define ZMQ_USE_POLL +#include poll.hpp #else #error Unsupported platform #endif Index: zeromq3-4.0.5+dfsg/tests/Makefile.am === --- zeromq3-4.0.5+dfsg.orig/tests/Makefile.am +++ zeromq3-4.0.5+dfsg/tests/Makefile.am @@ -100,4 +100,7 @@ TESTS = $(noinst_PROGRAMS) if !ON_LINUX XFAIL_TESTS = test_abstract_ipc +if ON_GNU +XFAIL_TESTS += test_pair_ipc test_reqrep_ipc +endif endif lt-test_reqrep_ipc Description: application/executable