Fwd: Debug strategy for musl Postgres?

From: John Mudd <johnbmudd(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Fwd: Debug strategy for musl Postgres?
Date: 2014-04-13 20:08:00
Message-ID: CAGDMk9GNgQRHwx3w4ZV0Wb69e9Ed9GpsNsnMOxs9QoGKwkYSNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Reposting from pgsql-bugs since this is not a bug.

I built Postgres 9.3.4 from source on top of the musl C library,
http://www.musl-libc.org/
I also built zlib, bzip2, ncurses, openssl, readline and Python using musl
as a foundation for Postgres.

I'm using musl to increase the portability of the Postgres binary. I build
on Ubuntu 13.10 but will runs on older Linux boxes.

So far I get better results with the musl Postgres built on modern Ubuntu
and running on an old kernel than building Postgres directly on the old
Linux using standard C library. But the musl Postgres is still not working
fully. I'm not getting responses from the server.

Here's the tail end "strace pg_isready" output for musl Postgres built and
running on Ubuntu 13.10:

clock_gettime(CLOCK_REALTIME, {1397359337, 426941692}) = 0
poll([{fd=4, events=POLLOUT|POLLERR}], 1, 3000) = 1 ([{fd=4,
revents=POLLOUT}])
sendto(4, "\0\0\0=\0\3\0\0user\0mudd\0database\0mudd\0"..., 61,
MSG_NOSIGNAL, NULL, 0) = 61
clock_gettime(CLOCK_REALTIME, {1397359337, 427070343}) = 0
poll([{fd=4, events=POLLIN|POLLERR}], 1, 3000) = 1 ([{fd=4,
revents=POLLIN}])
recvfrom(4, "R\0\0\0\10\0\0\0\0E\0\0\0RSFATAL\0C3D000\0Mdat"..., 16384, 0,
NULL, NULL) = 92
close(4) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo
...}) = 0
writev(1, [{"/tmp:5432 - accepting connection"..., 33}, {"\n", 1}], 2) = 34
exit_group(0) = ?

Here's the tail end "strace pg_isready" output for musl Postgres built on
Ubuntu 13.10 but running on old Linux:

clock_gettime(0, 0xbfffa5a8) = -1 ENOSYS (Function not
implemented)
gettimeofday(NULL, {300, 0}) = 0
poll([{fd=3, events=POLLOUT|POLLERR, revents=POLLOUT}], 1, 3000) = 1
sendto(3, "\0\0\0?\0\3\0\0user\0jmudd\0database\0jmud"..., 63, 0x4000,
NULL, 0) = 63

clock_gettime(0, 0xbfffa5a8) = -1 ENOSYS (Function not
implemented)
gettimeofday(NULL, {300, 0}) = 0
poll([{fd=3, events=POLLIN|POLLERR}], 1, 3000) = 0
close(3) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
writev(1, [{"/tmp:5432 - no response", 23}, {"\n", 1}], 2) = 24
exit_group(2) = ?

For my next step I'll try building musl Postgres with the --enable-cassert
option. What else can I do to debug this?

John

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John Mudd 2014-04-13 20:19:34 Re: Debug strategy for musl Postgres?
Previous Message John Mudd 2014-04-13 20:04:34 Re: Debug strategy for musl Postgres?

Browse pgsql-hackers by date

  From Date Subject
Next Message John Mudd 2014-04-13 20:19:34 Re: Debug strategy for musl Postgres?
Previous Message John Mudd 2014-04-13 20:04:34 Re: Debug strategy for musl Postgres?