Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: Waldemar Brodkorb <wbx@openadk.org>
Cc: devel@uclibc-ng.org, "Yann E . MORIN" <yann.morin.1998@free.fr>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [uclibc-ng-devel] Re: [PATCH v1] package/ntpsec: new package
Date: Thu, 4 Nov 2021 21:30:45 +0100	[thread overview]
Message-ID: <20211104213045.1d702c3d@gmx.net> (raw)
In-Reply-To: <YX3NuMeoXJyNSD8S@waldemar-brodkorb.de>

Hello Waldemar,

On Sun, 31 Oct 2021 00:56:56 +0200, Waldemar Brodkorb <wbx@openadk.org> wrote:

> Hi Peter,
> Peter Seiderer wrote,
>
> > Hello Waldemar, *,
> >
> > On Mon, 25 Oct 2021 23:25:41 +0200, Peter Seiderer <ps.report@gmx.net> wrote:
> >
> > The resulting ntpd runs fine with the raspberrypi3_defconfig, but segfaults
> > when compiled/used with raspberrypi3_64_defconfig (uclibc, -Os):
> >
> > 	$ /usr/sbin/ntpd -n -d -g
> > 1970-01-01T00:04:18 ntpd[263]: INIT: ntpd ntpsec-1.2.0 2021-10-24T13:39:21Z: Starting
> > 1970-01-01T00:04:18 ntpd[263]: INIT: Command line: /usr/sbin/ntpd -n -d
> > 1970-01-01T00:04:18 ntpd[263]: INIT: precision = 7.291 usec (-17)
> > 1970-01-01T00:04:18 ntpd[263]: INIT: successfully locked into RAM
> > 1970-01-01T00:04:18 ntpd[263]: CONFIG: readconfig: parsing file: /etc/ntp.conf
> > 1970-01-01T00:04:18 ntpd[263]: CONFIG: restrict nopeer ignored
> > 1970-01-01T00:04:18 ntpd[263]: INIT: Using SO_TIMESTAMPNS
> > 1970-01-01T00:04:18 ntpd[263]: IO: Listen and drop on 0 v6wildcard [::]:123
> > 1970-01-01T00:04:18 ntpd[263]: IO: Listen and drop on 1 v4wildcard 0.0.0.0:123
> > 1970-01-01T00:04:18 ntpd[263]: IO: Listen normally on 2 lo 127.0.0.1:123
> > 1970-01-01T00:04:18 ntpd[263]: IO: Listen normally on 3 eth0 172.16.0.30:123
> > 1970-01-01T00:04:18 ntpd[263]: IO: Listen normally on 4 lo [::1]:123
> > 1970-01-01T00:04:18 ntpd[263]: IO: Listen normally on 5 eth0 [fe80::ba27:ebff:fea6:340%2]:123
> > 1970-01-01T00:04:18 ntpd[263]: IO: Listening on routing socket on fd #22 for interface updates
> > 1970-01-01T00:04:19 ntpd[263]: SYNC: Found 10 servers, suggest minsane at least 3
> > 1970-01-01T00:04:19 ntpd[263]: INIT: MRU 10922 entries, 13 hash bits, 65536 bytes
> > 1970-01-01T00:04:20 ntpd[263]: DNS: dns_probe: 0.pool.ntp.org, cast_flags:8, flags:101
> > Segmentation fault (core dumped)
>
> Could you add a small C test program to uClibc-ng-test to trigger
> the bug? That would help to find any regression to targets without
> TLS support.

Did take a first look at the uClibc-ng-test regarding the problem,
there is already one test/inet/tst-res test...


For the raspberrypi3_defconfig case (uclibc unpatched):

	$ sh uclibcng-testrunner.sh
[...]
FAIL tst-ethers-line got 1 expected 0
	Cannot open file /etc/ethers: No such file or directory
FAIL tst-ethers got 1 expected 0
	Either /etc/ethers is missing or it has incorrect contents
[...]
FAIL tst-cancel18 got 1 expected 0
	going to cancel in-time
	Timed out: killed the child process
[...]
FAIL tst-cancelx18 got 1 expected 0
	going to cancel in-time
	Timed out: killed the child process
[...]
Total skipped: 15
Total failed: 4
Total passed: 460



For the raspberrypi3_64_defconfig case (uclibc unpatched):

	$ sh uclibcng-testrunner.sh
[...]
FAIL tst-ethers-line got 1 expected 0
	Cannot open file /etc/ethers: No such file or directory
FAIL tst-ethers got 1 expected 0
	Either /etc/ethers is missing or it has incorrect contents
[...]
FAIL tst-res got 139 expected 0
	Segmentation fault (core dumped)
[...]
FAIL tst-seekdir got 1 expected 0
	.
	..
	tst-seekdir.out
	tst-utmpx
	tst-inotify
	tst-mkostemps.out
	seek.out
	tst-scandir
	tst-seekdir
	tst-statvfs.out
	sem
	stdarg.out
	fdopen.out
	tst-utmp
	tst-preadvwritev.out
	bug-glob2.out
	popen
	dirent64.out
	tst-scandir.out
	tst-hasmntopt.out
	tst-statvfs
	bug-glob2
	popen.out
	Makefile
	opendir-tst1
	sem.out
	tst-inotify.out
	tst-syscall0
	tst-statfs.out
	bug-readdir1
	dirent.out
	tst-statfs
	tst-syscall1.out
	tst-syscall0.out
	stdarg
	tst-preadvwritev
	tst-syscall6.out
	tst-mkostemps
	Makefile.in
	tst-utmp.out
	tst-nftw
	opendir-tst1.out
	tst-syscall1
	bug-readdir1.out
	tst-hasmntopt
	tst-syscall6
	fdopen
	seek
	tst-nftw.out
	dirent64
	tst-fnmatch.input
	tst-utmpx.out
	dirent
	going back past 4-th entry...
	seekdir (d, -1600443765); telldir (d) == -1
[...]
FAIL tst-cancel18 got 1 expected 0
	going to cancel in-time
	Timed out: killed the child process
[...]
FAIL tst-cancelx18 got 1 expected 0
	going to cancel in-time
	Timed out: killed the child process
[...]
FAIL tst-tls3 got 1 expected 0

	/usr/lib/uclibc-ng-test/test/tls/tst-tls3: symbol 'baz': can't handle reloc type 0x404
FAIL tst-tls4 got 1 expected 0

	/usr/lib/uclibc-ng-test/test/tls/tst-tls4: symbol 'foo': can't handle reloc type 0x404
FAIL tst-tls5 got 1 expected 0

	/usr/lib/uclibc-ng-test/test/tls/tst-tls5: symbol 'foo': can't handle reloc type 0x404
FAIL tst-tls6 got 1 expected 0

	/usr/lib/uclibc-ng-test/test/tls/tst-tls6: symbol 'foo': can't handle reloc type 0x404
FAIL tst-tls7 got 1 expected 0

	/usr/lib/uclibc-ng-test/test/tls/tst-tls7: symbol 'foo': can't handle reloc type 0x404
FAIL tst-tls8 got 1 expected 0

	/usr/lib/uclibc-ng-test/test/tls/tst-tls8: symbol 'foo': can't handle reloc type 0x404
[...]
Total skipped: 15
Total failed: 12
Total passed: 454


The tst-res Segmentation fault failure can be fixed by
this additional uclibc patch:

--- a/include/resolv.h
+++ b/include/resolv.h
@@ -457,7 +457,7 @@ __END_DECLS
 #    ifndef NOT_IN_libc
 #     define __resp __libc_resp
 #    endif
-#    define _res (*__resp)
+#    define _res (*__res_state())
 extern __thread struct __res_state *__resp attribute_tls_model_ie;
 #   endif
 #  else


Will take a look at some glibc resolv tests and try to port
them (and, if I find enough time, at some of the other
failures)...

Regards,
Peter

>
> best regards
>  Waldemar

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-11-04 20:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 21:25 [Buildroot] [PATCH v1] package/ntpsec: new package Peter Seiderer
2021-10-28 21:01 ` Peter Seiderer
2021-10-30 22:56   ` [Buildroot] [uclibc-ng-devel] " Waldemar Brodkorb
2021-11-04 20:30     ` Peter Seiderer [this message]
2021-11-11  8:58       ` Waldemar Brodkorb
2021-11-25 20:26         ` Peter Seiderer
2021-12-12 20:07 ` [Buildroot] [PATCH 1/1] " guillaume.bressaix
2021-12-15 20:43   ` Peter Seiderer
2021-12-15 21:21     ` Guillaume Bres
2021-12-15 22:15       ` Peter Seiderer
2021-12-17  7:57         ` Guillaume Bres

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=20211104213045.1d702c3d@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@buildroot.org \
    --cc=devel@uclibc-ng.org \
    --cc=wbx@openadk.org \
    --cc=yann.morin.1998@free.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox