Actions
Bug #783
closedSnapshot record does not handle max sizes correctly when different subbuffer sizes are used
Start date:
04/16/2014
Due date:
% Done:
100%
Estimated time:
Description
The following max stream buffer size calculation is wrong.
max_stream_size = output->max_size / nb_streams; (lttng-tools/src/bin/lttng-sessiond/ust-app.c, ln4933)
This assumes that all streams in a session are of the same size and will fail when its not the case. The same logic is duplicated on the kernel.c side.
Example on a machine sporting an i7 quad-core (with HT):
$ lttng create --snapshot # Creating a channel containing 8 streams, so 16 * 8 = 128M $ lttng enable-channel chan1 -u --num-subbuf 1 --subbuf-size 16M # Creating a channel containing 8 streams, so 4 * 8 = 32M $ lttng enable-channel chan2 -u --num-subbuf 1 --subbuf-size 4M $ lttng start # Starting an instrumented application in another terminal # The snapshot should fit in 160M... $ lttng snapshot record -m 160M Error: Invalid parameter
The session daemon gives this error message:
DEBUG3 [21150/21153]: UST app snapshot record maximum stream size 5242880 is smaller than subbuffer size of 16777216 (in ust_app_snapshot_record() at ust-app.c:4976)
Actions