[chrony-dev] crash when overloading refclock_sock

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


I was testing a refclock_sock provider and when the rate of messages
is really high (over 50k/s), I manage to crash chronyd.

Yes, this is not the standard use case, usually I publish 1/s, but
anyway chrony ideally should resist to this abuse.


2016-10-05T07:58:01Z refclock.c:707:(filter_add_sample) filter sample
52 t=1475654280.876999978 offset=0.122999928 dispersion=0.000000001
2016-10-05T07:58:01Z refclock.c:707:(filter_add_sample) filter sample
53 t=1475654280.876999978 offset=0.122999928 dispersion=0.000000001
2016-10-05T07:58:01Z refclock.c:707:(filter_add_sample) filter sample
54 t=1475654280.876999978 offset=0.122999928 dispersion=0.000000001
2016-10-05T07:58:01Z refclock.c:707:(filter_add_sample) filter sample
55 t=1475654280.876999978 offset=0.122999928 dispersion=0.000000001
2016-10-05T07:58:01Z sources.c:360:(SRC_AccumulateSample) ip=[SOCK]
t=1475654280.876999978 ofs=-0.123000 del=0.000000 disp=-nan str=0
chronyd: sourcestats.c:388: find_best_sample_index: Assertion
`best_index >= 0' failed.
Aborted (core dumped)

This is probably due to some uint8/int16 overflow?

I have a simple c++ sock (and shm) provider that I can provide if you
need it to debug or to add it to the regression tests.

Thanks,
Nuno

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/