Bug 395416 - --log-file output isn't split correctly after call vgdb
Summary: --log-file output isn't split correctly after call vgdb
Status: RESOLVED WORKSFORME
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.13.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-15 08:31 UTC by Opera Wang
Modified: 2018-10-18 19:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Opera Wang 2018-06-15 08:31:19 UTC
To work around bug 395414 , we call vgdb periodically to see if the application calls exit() but does not quit.

However, it turns out call vgdb will make split log file does not work correctly, if we do not call vgdb, the fix in bug 162848 works fine. But if we call vgdb on parent process eg 29351:
/depotbld/RHEL5.5/tools/valgrind/3.13.0-rhel-6/bin/vgdb --pid=29351 v.info scheduler

Then child process 31414's log file only contains a few start information like valgrind command line options, and the left log will mixed in 29351's log:

--29351-- REDIR: 0xfe25cc0 (libc.so.6:strcspn) redirected to 0xa564730 (_vgnU_ifunc_wrapper)
--29351-- REDIR: 0xfed89e0 (libc.so.6:__strcspn_sse42) redirected to 0xa7700b0 (strcspn)
==31414== Reset valgrind output to log (reset_after_fork)
==31414== Warning: invalid file descriptor -1 in syscall close()
==31414==    at 0xB48F870: __close_nocancel (in /lib64/libpthread-2.12.so)
Comment 1 Philippe Waroquiers 2018-07-27 21:53:25 UTC
I tried to reproduce it, but could not.

Can you attach a compilable small C program to reproduce it,
together with the precise commands to reproduce the problem:
* valgrind options used to start the C program
* at what time do you start vgdb

Thanks

Philippe
Comment 2 Philippe Waroquiers 2018-09-03 21:29:55 UTC
Any news/feedback/additional data ?