Re: [chrony-dev] Failure of certain simulation tests

2024-04-25 Thread Vincent Blut
Le 2024-04-25 09:13, Miroslav Lichvar a écrit :
> On Wed, Apr 24, 2024 at 04:46:07PM +0200, Vincent Blut wrote:
> > The failing tests that initiated this thread are now fixed, however 
> > 002-largenetwork
> > still fails though.
> 
> I think that's the arm emulation being too slow and causing timeouts.
> Try setting the CLKNETSIM_CONNECT_TIMEOUT environment variable to 100.

All good now. Thanks a lot Miroslav!

Cheers,
Vincent


signature.asc
Description: PGP signature


Re: [chrony-dev] Failure of certain simulation tests

2024-04-25 Thread Miroslav Lichvar
On Wed, Apr 24, 2024 at 04:46:07PM +0200, Vincent Blut wrote:
> The failing tests that initiated this thread are now fixed, however 
> 002-largenetwork
> still fails though.

I think that's the arm emulation being too slow and causing timeouts.
Try setting the CLKNETSIM_CONNECT_TIMEOUT environment variable to 100.

-- 
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].



Re: [chrony-dev] Failure of certain simulation tests

2024-04-24 Thread Vincent Blut
Le 2024-04-24 12:17, Miroslav Lichvar a écrit :
> On Thu, Apr 18, 2024 at 07:07:33PM +0200, Vincent Blut wrote:
> > Le 2024-04-18 17:19, Miroslav Lichvar a écrit :
> > > On Thu, Apr 18, 2024 at 04:06:54PM +0200, Vincent Blut wrote:
> > > > So after building clknetsim with these flags, the same tests are still
> > > > failing (well I guess so because I stopped the execution after 
> > > > 008-ntpera
> > > > has failed since the execution time is so slow on my armhf vm.)
> > > 
> > > Hm, can you please run readelf -sW /usr/sbin/chronyd on this machine?
> > > Maybe there is a new 64-bit specific symbol on this arch that needs to
> > > be covered.
> > 
> > Attached.
> 
> > 62:  0 FUNCGLOBAL DEFAULT  UND 
> > __fstat64_time64@GLIBC_2.34 (4)
> >145:  0 FUNCGLOBAL DEFAULT  UND 
> > __stat64_time64@GLIBC_2.34 (4)
> 
> Missing support for these two caused chronyd and gnutls to
> misinterpret the stat data due to unexpected format. There was also a
> problem with atol() not parsing 64-bit numbers. It should be fixed now
> in git.

The failing tests that initiated this thread are now fixed, however 
002-largenetwork
still fails though.

> Thanks for the report.

You're welcome.


signature.asc
Description: PGP signature


Re: [chrony-dev] Failure of certain simulation tests

2024-04-24 Thread Miroslav Lichvar
On Thu, Apr 18, 2024 at 07:07:33PM +0200, Vincent Blut wrote:
> Le 2024-04-18 17:19, Miroslav Lichvar a écrit :
> > On Thu, Apr 18, 2024 at 04:06:54PM +0200, Vincent Blut wrote:
> > > So after building clknetsim with these flags, the same tests are still
> > > failing (well I guess so because I stopped the execution after 008-ntpera
> > > has failed since the execution time is so slow on my armhf vm.)
> > 
> > Hm, can you please run readelf -sW /usr/sbin/chronyd on this machine?
> > Maybe there is a new 64-bit specific symbol on this arch that needs to
> > be covered.
> 
> Attached.

> 62:  0 FUNCGLOBAL DEFAULT  UND 
> __fstat64_time64@GLIBC_2.34 (4)
>145:  0 FUNCGLOBAL DEFAULT  UND __stat64_time64@GLIBC_2.34 
> (4)

Missing support for these two caused chronyd and gnutls to
misinterpret the stat data due to unexpected format. There was also a
problem with atol() not parsing 64-bit numbers. It should be fixed now
in git.

Thanks for the report.

-- 
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].



Re: [chrony-dev] Failure of certain simulation tests

2024-04-18 Thread Vincent Blut
Le 2024-04-18 17:19, Miroslav Lichvar a écrit :
> On Thu, Apr 18, 2024 at 04:06:54PM +0200, Vincent Blut wrote:
> > > The log shows that clknetsim is not built with the -D_LARGEFILE_SOURCE
> > > -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 flags. It needs to use the same
> > > time_t as the chronyd binaries.
> > 
> > So after building clknetsim with these flags, the same tests are still
> > failing (well I guess so because I stopped the execution after 008-ntpera
> > has failed since the execution time is so slow on my armhf vm.)
> 
> Hm, can you please run readelf -sW /usr/sbin/chronyd on this machine?
> Maybe there is a new 64-bit specific symbol on this arch that needs to
> be covered.

Attached.
Symbol table '.dynsym' contains 212 entries:
   Num:Value  Size TypeBind   Vis  Ndx Name
 0:  0 NOTYPE  LOCAL  DEFAULT  UND
 1: 255c 0 SECTION LOCAL  DEFAULT   11 .init
 2: 00034000 0 SECTION LOCAL  DEFAULT   22 .data
 3:  0 FUNCGLOBAL DEFAULT  UND getnameinfo@GLIBC_2.4 (2)
 4:  0 FUNCGLOBAL DEFAULT  UND seccomp_load
 5:  0 FUNCGLOBAL DEFAULT  UND 
gnutls_credentials_set@GNUTLS_3_4 (3)
 6:  0 FUNCGLOBAL DEFAULT  UND freeifaddrs@GLIBC_2.4 (2)
 7:  0 FUNCGLOBAL DEFAULT  UND qsort@GLIBC_2.4 (2)
 8:  0 FUNCGLOBAL DEFAULT  UND pthread_join@GLIBC_2.34 (4)
 9:  0 FUNCGLOBAL DEFAULT  UND sigemptyset@GLIBC_2.4 (2)
10:  0 FUNCGLOBAL DEFAULT  UND 
gnutls_prf_rfc5705@GNUTLS_3_4 (3)
11:  0 FUNCGLOBAL DEFAULT  UND __fcntl_time64@GLIBC_2.34 (4)
12:  0 FUNCGLOBAL DEFAULT  UND strerror@GLIBC_2.4 (2)
13:  0 FUNCGLOBAL DEFAULT  UND inet_ntop@GLIBC_2.4 (2)
14:  0 FUNCGLOBAL DEFAULT  UND mkdir@GLIBC_2.4 (2)
15:  0 FUNCGLOBAL DEFAULT  UND unsetenv@GLIBC_2.4 (2)
16:  0 FUNCGLOBAL DEFAULT  UND 
gnutls_certificate_set_x509_system_trust@GNUTLS_3_4 (3)
17:  0 FUNCGLOBAL DEFAULT  UND geteuid@GLIBC_2.4 (2)
18:  0 FUNCGLOBAL DEFAULT  UND abort@GLIBC_2.4 (2)
19:  0 FUNCGLOBAL DEFAULT  UND connect@GLIBC_2.4 (2)
20:  0 FUNCGLOBAL DEFAULT  UND getsockname@GLIBC_2.4 (2)
21:  0 FUNCGLOBAL DEFAULT  UND random@GLIBC_2.4 (2)
22:  0 FUNCGLOBAL DEFAULT  UND setgroups@GLIBC_2.4 (2)
23:  0 FUNCGLOBAL DEFAULT  UND memcmp@GLIBC_2.4 (2)
24:  0 FUNCGLOBAL DEFAULT  UND __prctl_time64@GLIBC_2.34 (4)
25:  0 FUNCGLOBAL DEFAULT  UND sysconf@GLIBC_2.4 (2)
26:  0 FUNCGLOBAL DEFAULT  UND 
gnutls_record_recv@GNUTLS_3_4 (3)
27:  0 FUNCGLOBAL DEFAULT  UND __isoc99_fscanf@GLIBC_2.7 (5)
28:  0 FUNCGLOBAL DEFAULT  UND exp@GLIBC_2.29 (6)
29:  0 OBJECT  GLOBAL DEFAULT  UND gnutls_free@GNUTLS_3_4 (3)
30:  0 FUNCGLOBAL DEFAULT  UND __sendmsg64@GLIBC_2.34 (4)
31:  0 FUNCGLOBAL DEFAULT  UND 
gnutls_error_is_fatal@GNUTLS_3_4 (3)
32:  0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
33:  0 FUNCGLOBAL DEFAULT  UND gnutls_handshake@GNUTLS_3_4 
(3)
34:  0 FUNCGLOBAL DEFAULT  UND tzset@GLIBC_2.4 (2)
35:  0 FUNCGLOBAL DEFAULT  UND 
gnutls_alpn_set_protocols@GNUTLS_3_4 (3)
36:  0 FUNCGLOBAL DEFAULT  UND __isoc99_sscanf@GLIBC_2.7 (5)
37:  0 FUNCGLOBAL DEFAULT  UND seccomp_init
38:  0 FUNCGLOBAL DEFAULT  UND __mktime64@GLIBC_2.34 (4)
39:  0 FUNCGLOBAL DEFAULT  UND 
nettle_cmac_aes128_digest@NETTLE_8 (7)
40:  0 FUNCGLOBAL DEFAULT  UND socketpair@GLIBC_2.4 (2)
41:  0 FUNCGLOBAL DEFAULT  UND rename@GLIBC_2.4 (2)
42:  0 FUNCGLOBAL DEFAULT  UND strncpy@GLIBC_2.4 (2)
43:  0 FUNCGLOBAL DEFAULT  UND fclose@GLIBC_2.4 (2)
44:  0 FUNCGLOBAL DEFAULT  UND fgets@GLIBC_2.4 (2)
45:  0 FUNCGLOBAL DEFAULT  UND recv@GLIBC_2.4 (2)
46:  0 FUNCGLOBAL DEFAULT  UND getenv@GLIBC_2.4 (2)
47:  0 FUNCGLOBAL DEFAULT  UND __printf_chk@GLIBC_2.4 (2)
48:  0 FUNCGLOBAL DEFAULT  UND seccomp_rule_add
49:  0 FUNCGLOBAL DEFAULT  UND strchr@GLIBC_2.4 (2)
50:  0 FUNCGLOBAL DEFAULT  UND strcasecmp@GLIBC_2.4 (2)
51:  0 FUNCGLOBAL DEFAULT  UND __cxa_atexit@GLIBC_2.4 (2)
52:  0 FUNCGLOBAL DEFAULT  UND pclose@GLIBC_2.4 (2)
53:  0 FUNCGLOBAL DEFAULT  UND listen@GLIBC_2.4 (2)
54:  0 FUNCGLOBAL DEFAULT  UND cap_set_proc
55:  0 FUNCGLOBAL DEFAULT  UND 
gnutls_sessi

Re: [chrony-dev] Failure of certain simulation tests

2024-04-18 Thread Miroslav Lichvar
On Thu, Apr 18, 2024 at 04:06:54PM +0200, Vincent Blut wrote:
> > The log shows that clknetsim is not built with the -D_LARGEFILE_SOURCE
> > -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 flags. It needs to use the same
> > time_t as the chronyd binaries.
> 
> So after building clknetsim with these flags, the same tests are still
> failing (well I guess so because I stopped the execution after 008-ntpera
> has failed since the execution time is so slow on my armhf vm.)

Hm, can you please run readelf -sW /usr/sbin/chronyd on this machine?
Maybe there is a new 64-bit specific symbol on this arch that needs to
be covered.

-- 
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].



Re: [chrony-dev] Failure of certain simulation tests

2024-04-18 Thread Vincent Blut
Hi,

Le 2024-04-16 08:08, Miroslav Lichvar a écrit :
> On Tue, Apr 16, 2024 at 12:25:53AM +0200, Vincent Blut wrote:
> > I have yet to set up an armhf based environment to properly debug those 
> > failures,
> > but the most likely cause seems to be the ongoing migration of our
> > 32-bits architectures to 64-bits time_t. If so, do you have an idea
> > about where the problem lies?
> 
> > ¹ https://ci.debian.net/packages/c/chrony/unstable/armhf/45199616/#S6
> 
> The log shows that clknetsim is not built with the -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 flags. It needs to use the same
> time_t as the chronyd binaries.

So after building clknetsim with these flags, the same tests are still
failing (well I guess so because I stopped the execution after 008-ntpera
has failed since the execution time is so slow on my armhf vm.)

Something new though, the 002-largenetwork test now fails too.
make: Entering directory '/tmp/autopkgtest-lxc.twwwe2ae/downtmp/autopkgtest_tmp'
cc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -O2 -Wall -g 
-fPIC -DGETTIMEOFDAY_VOID  -c -o client.o client.c
In file included from sysheaders.h:16,
 from protocol.h:21,
 from client.c:68:
client.c: In function ‘clock_settime’:
client.c:970:16: warning: ‘nonnull’ argument ‘tp’ compared to NULL 
[-Wnonnull-compare]
  970 | assert(tp && which_clock == CLOCK_REALTIME);
  |^~
client.c: In function ‘poll’:
client.c:1295:27: warning: ‘*.fd’ may be used uninitialized 
[-Wmaybe-uninitialized]
 1295 | if (fds[i].fd < 0)
  | ~~^~~
client.c:1284:25: note: accessing argument 1 of a function declared with 
attribute ‘access (write_only, 1, 2)’
 1284 | int poll(struct pollfd *fds, nfds_t nfds, int timeout) {
  |  ~~~^~~
cc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -O2 -Wall -g 
-fPIC -shared -o clknetsim.so client.o  -ldl -lm
g++ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -O2 -Wall -g 
-fPIC -DGETTIMEOFDAY_VOID  -c -o clock.o clock.cc
g++ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -O2 -Wall -g 
-fPIC -DGETTIMEOFDAY_VOID  -c -o generator.o generator.cc
g++ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -O2 -Wall -g 
-fPIC -DGETTIMEOFDAY_VOID  -c -o network.o network.cc
In file included from /usr/include/c++/13/map:62,
 from generator.h:23,
 from clock.h:23,
 from node.h:22,
 from network.h:26,
 from network.cc:19:
/usr/include/c++/13/bits/stl_tree.h: In function ‘std::_Rb_tree<_Key, _Val, 
_KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, 
_Compare, _Alloc>::_M_emplace_hint_unique(const_iterator, _Args&& ...) [with 
_Args = {const std::piecewise_construct_t&, 
std::tuple, 
std::allocator >&&>, std::tuple<>}; _Key = 
std::__cxx11::basic_string; _Val = std::pair, double>; _KeyOfValue = 
std::_Select1st, double> >; 
_Compare = std::less >; _Alloc = 
std::allocator, double> >]’:
/usr/include/c++/13/bits/stl_tree.h:2458:7: note: parameter passing for 
argument of type ‘std::_Rb_tree, 
std::pair, double>, 
std::_Select1st, double> >, 
std::less >, std::allocator, double> > >::const_iterator’ changed in GCC 
7.1
 2458 |   _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
  |   ^~~
In file included from /usr/include/c++/13/map:63:
In member function ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& 
std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = 
std::__cxx11::basic_string; _Tp = double; _Compare = 
std::less >; _Alloc = 
std::allocator, double> >]’,
inlined from ‘void Network::send(Packet*)’ at network.cc:409:30:
/usr/include/c++/13/bits/stl_map.h:532:44: note: parameter passing for argument 
of type ‘std::_Rb_tree, std::pair, double>, std::_Select1st, double> >, 
std::less >, std::allocator, double> > >::const_iterator’ changed in GCC 
7.1
  532 |   __i = _M_t._M_emplace_hint_unique(__i, 
std::piecewise_construct,
  | 
~~~^~~
  533 | 
std::forward_as_tuple(std::move(__k)),
  | 
~~
  534 | std::tuple<>());
  | ~~~
In member function ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& 
std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = 
std::__cxx11::basic_string; _Tp = double; _Compare = 
std::less >; _Alloc = 
std::allocator, double> >]’,
inlined from ‘void Network::send(Packet*)’ at network.cc:410:30:
/usr/include/c++/13/bits/stl_map.h:532:44: note: parameter passing for argument 
of type ‘std::_Rb_tree, std::pair, doub

Re: [chrony-dev] Failure of certain simulation tests

2024-04-15 Thread Miroslav Lichvar
On Tue, Apr 16, 2024 at 12:25:53AM +0200, Vincent Blut wrote:
> I have yet to set up an armhf based environment to properly debug those 
> failures,
> but the most likely cause seems to be the ongoing migration of our
> 32-bits architectures to 64-bits time_t. If so, do you have an idea
> about where the problem lies?

> ¹ https://ci.debian.net/packages/c/chrony/unstable/armhf/45199616/#S6

The log shows that clknetsim is not built with the -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 flags. It needs to use the same
time_t as the chronyd binaries.

-- 
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].