Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v7YGg-004Pnt-PY for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Oct 2025 12:00:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v7YGe-00G0j7-JO for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Oct 2025 12:00:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v7YGe-00G0iz-8l for pgsql-hackers@lists.postgresql.org; Sat, 11 Oct 2025 12:00:09 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v7YGZ-001ZzO-2F for pgsql-hackers@lists.postgresql.org; Sat, 11 Oct 2025 12:00:08 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3f0ae439bc3so1363401f8f.1 for ; Sat, 11 Oct 2025 05:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760184003; x=1760788803; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fJ/o1IzlwFozaEOtPdsC5+SMQVSTloaljf643r9pUYw=; b=BlkpBpkzjwgWNoiEJp5FIBjlP71Quk3Rq1Jmpp4+4uJbd3ZQwv6XD2fvjKOEl81A9O hpx/SbVSDLnM/CpF/ura+ece68jmH9fmYOiVsKuoNedRwotZRYdsvIzVOfUTlWZGyH3k r1u5d2KEIIICg9bWKlyZaNd1+6hjo9ki+kaH1VzKXqdNvp4y3E/FrGlFvYpHVnIvTtdG wkRpswzsN1r8JPZiwELmCOYzcR8ZwbQc5c1ih7a+3WzAp/BkY/iOWOK7kNSDziM1Whh9 VBjBD/UY3aahv0oRM328svfRcsKJcxM+T2iDTBhcgsyoG9cS44wDYrQYhwBBCC5MvaOX hcQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760184003; x=1760788803; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fJ/o1IzlwFozaEOtPdsC5+SMQVSTloaljf643r9pUYw=; b=jp7D30kifhoIkmjzEg5eqOVNO5+UwYOmeuxc2vK/Zl6mKFL6u0B9kfUBqbV1zzFmSz glk+Gx9CkgDwC9FtBPVwSxFoD4gUR7+8eDm1TauHMKoWspR0NDTjSr85CjA1Fh1PRrM5 AC1bR5Y5Q0vC0/O5N+gRTa+xcVB6mMAbru2GqgDrotnw9jPLsBD7Y+fp8kYBkrNuyYcV anzTy8AeR08qPnB4ZUnN1eZlBPjWvqt9j66lg0z5cneqemLdFz0nuDtgJEFbw1/ner6i rGfPYA6hDy9rse1jZU5taUrn/xpJoit3fE3TnIorbNdeYyGzu7lHj4/mMnYGLyIXp6Ux KwGA== X-Forwarded-Encrypted: i=1; AJvYcCWljwCoLNTr650lkEu8izirLdPwL7KChaNgueUfxmbCOhdUf306iVAunTtJcKChSPpw4QCd88/98oNz7B8i@lists.postgresql.org X-Gm-Message-State: AOJu0YwTRnZAxfot8gLF5zIVmsYKlBGXWhBPQWH6aPO+M3NZc7T5Qkcz E+paq7D85Mc8dMFGCIlog8mUKLgkpbWPhV64dy1uw6B9rieqT7vlQ/qc X-Gm-Gg: ASbGncshxBA3zZONEGrWjJRG39AqBf4kKrMA8/PslGWVFCOthX/pUsRF7Ky9CCtFhvP 1fkuutFB+9H4J4sD9995Hvb/BnSLj8BydOMG0anklvLmvZz01txtVvW/GFbf8WdAYpZ1K/CHHlw STxNu353KxZBC/EOytPuPVbd6gV7MzvIemZhBJ5HW3TNfi7g1iWswWQvmvvLtQH77tJIncSL2fs Q1NUL/2793B6q+BShpzjNP0waO/vmxLTANwon4gbn2Fn9+mwpwWar82tH1Iqol6Hjl2Du6AUOyH Fa9Izl8xayYiZdqPTfYE7sAUY8xe/8wkIbBjZ4koGsfsqExA/MoJ0CP91jSBp8zwvL0vGvmvebr 7T4vWXJVpe0GVlNlbQBhekq8pNgBsrupe94qx7m7LbbvfNGqCmc2jlTY= X-Google-Smtp-Source: AGHT+IGd/2sK5ZPhNGIiwKXtFsWCyRDodZe/nXs3BoshixdjxgD0v2Bu4tJ9vov9YxcLsxdDOjT2ag== X-Received: by 2002:a05:6000:491e:b0:426:d549:5861 with SMTP id ffacd0b85a97d-426d5495947mr1387674f8f.42.1760184002665; Sat, 11 Oct 2025 05:00:02 -0700 (PDT) Received: from [192.168.0.50] ([89.149.120.198]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-426ce5cf6b4sm8699605f8f.25.2025.10.11.05.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Oct 2025 05:00:01 -0700 (PDT) Message-ID: Date: Sat, 11 Oct 2025 15:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: GNU/Hurd portability patches To: Thomas Munro , Michael Banck Cc: Tom Lane , Michael Paquier , pgsql-hackers@lists.postgresql.org References: <68d0f931.050a0220.3185e0.19ae@mx.google.com> <283c3d69-ef32-4391-9ea3-68e47c9dea31@gmail.com> <68d3a0a0.050a0220.167290.bcf3@mx.google.com> <68d3cbe8.5d0a0220.65f10.da5f@mx.google.com> <3314741.1758724126@sss.pgh.pa.us> <68d413a3.a70a0220.24c74c.8be9@mx.google.com> <68d55c1e.050a0220.6136.4224@mx.google.com> <3771131.1758819153@sss.pgh.pa.us> <68d629f2.050a0220.3685b9.5ce2@mx.google.com> Content-Language: en-US From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Thomas, Thank you for your attention to that anomaly! 10.10.2025 05:59, Thomas Munro wrote: > [Using this as a general GNU/Hurd problem thread] > > An interesting fruitcrow failure: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-09-30%2007%3A28%3A50 > > TRAP: failed Assert("postgres_signal_arg < PG_NSIG"), File: > "pqsignal.c", Line: 91, PID: 25731 I've added the following logging: static void wrapper_handler(SIGNAL_ARGS) { ...         Assert(postgres_signal_arg > 0); +fprintf(stderr, "!!!wrapper_handler[%d]| postgres_signal_arg: %d, PG_NSIG: %d\n", getpid(), postgres_signal_arg, PG_NSIG);         Assert(postgres_signal_arg < PG_NSIG); and got the following during a successful `make check` run: 2025-10-11 10:55:13.091 BST postmaster[1909] LOG:  starting PostgreSQL 19devel on x86_64-unknown-gnu0.9, compiled by gcc (Debian 14.2.0-12) 14.2.0, 64-bit 2025-10-11 10:55:13.092 BST postmaster[1909] LOG:  listening on Unix socket "/tmp/pg_regress-Tg7wMt/.s.PGSQL.58928" 2025-10-11 10:55:13.096 BST startup[1915] LOG:  database system was shut down at 2025-10-11 10:55:10 BST !!!wrapper_handler[1909]| postgres_signal_arg: 20, PG_NSIG: 33 2025-10-11 10:55:13.117 BST postmaster[1909] LOG:  database system is ready to accept connections !!!wrapper_handler[1910]| postgres_signal_arg: 16, PG_NSIG: 33 !!!wrapper_handler[1918]| postgres_signal_arg: 16, PG_NSIG: 33 ... $ grep -E -o '!!!.*postgres_signal_arg: [0-9]+' .../postmaster.log | grep -E -o '[0-9]+$' | sort | uniq 14 15 16 2 20 30 31 $ kill -l  1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP  6) SIGABRT      7) SIGEMT       8) SIGFPE       9) SIGKILL     10) SIGBUS 11) SIGSEGV     12) SIGSYS      13) SIGPIPE     14) SIGALRM     15) SIGTERM 16) SIGURG      17) SIGSTOP     18) SIGTSTP     19) SIGCONT     20) SIGCHLD 21) SIGTTIN     22) SIGTTOU     23) SIGIO       24) SIGXCPU     25) SIGXFSZ 26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGINFO     30) SIGUSR1 31) SIGUSR2     32) SIGLOST Whilst from a failed run, I got: ... !!!wrapper_handler[1988]| postgres_signal_arg: 30, PG_NSIG: 33 !!!wrapper_handler[1989]| postgres_signal_arg: 30, PG_NSIG: 33 !!!wrapper_handler[3284]| postgres_signal_arg: 14, PG_NSIG: 33 !!!wrapper_handler[3284]| postgres_signal_arg: 28476608, PG_NSIG: 33 TRAP: failed Assert("postgres_signal_arg < PG_NSIG"), File: "pqsignal.c", Line: 94, PID: 3284 !!!wrapper_handler[1980]| postgres_signal_arg: 30, PG_NSIG: 33 !!!wrapper_handler[3278]| postgres_signal_arg: 30, PG_NSIG: 33 !!!wrapper_handler[1980]| postgres_signal_arg: 30, PG_NSIG: 33 !!!wrapper_handler[3278]| postgres_signal_arg: 30, PG_NSIG: 33 postgres(ExceptionalCondition+0x5a) [0x1006af78a] postgres(+0x70f59a) [0x10070f59a] /lib/x86_64-gnu/libc.so.0.3(+0x39fee) [0x102b89fee] /lib/x86_64-gnu/libc.so.0.3(+0x39fdd) [0x102b89fdd] ... 2025-10-11 12:41:53.905 BST postmaster[1980] LOG:  client backend (PID 3284) was terminated by signal 6: Aborted 2025-10-11 12:41:53.905 BST postmaster[1980] DETAIL:  Failed process was running: insert into prtx2 select 1 + i%30, i, i           from generate_series(1,500) i, generate_series(1,10) j; > Is NSIG defined? Where on the internet can we see the SIGXXX signal > numbers and the glibc source that is actually used on these systems? > This has to be handling something installed by pqsignal(), so I guess > it's probably not the synchronous SIGABRT from abort() expected in > ExceptionCondition() (assuming that abort() is implemented as > raise(SIGABRT) in the traditional way, which might not be true), so > then I guess it must be an asynchronous signal, but which one? Searching through /usr/include/ gives me: /usr/include/signal.h:# define NSIG     _NSIG /usr/include/x86_64-gnu/bits/signum-generic.h:#define _NSIG             (__SIGRTMAX + 1) /usr/include/x86_64-gnu/bits/signum-arch.h:#define __SIGRTMAX __SIGRTMIN /usr/include/x86_64-gnu/bits/signum-arch.h:#define __SIGRTMIN   32 > I've so far resisted the urge to spin up a Debian GNU/Hurd box to > figure any of that out for myself, but maybe someone has a clue... That's pretty wise — the most frustrating thing with Hurd VM, which I created as described above, is that it hangs during tests (only 1 out of 5 `make check` runs completes) and killing the hanging processes doesn't restore it's working state — I have to reboot it (and fsck finds FS errors on each reboot) or even restore a copy of VM's disk. Best regards, Alexander