|
From: Steph <ste...@gm...> - 2013-01-15 06:36:47
|
Hello everyone! Got strange problem while tracing nginx using callgrind. I'm running trace with next command: valgrind --trace-children=yes --tool=callgrind /usr/local/nginx/sbin/nginx And as result got root@bt:~# ==1975== ==1975== Error: can not open cache simulation output file `/root/callgrind.out.1975' ==1958== ==1958== Events : Ir ==1958== Collected : 82162617 ==1958== ==1958== I refs: 82,162,617 valgrind version is 3.8.0. Nginx (nginx/1.3.7) I read that this problem should be fixed in 3.5.0 isn't it? -- Best wishes, Steph. |
|
From: Steph <ste...@gm...> - 2013-01-22 11:47:06
|
> Hello everyone! > Got strange problem while tracing nginx using callgrind. > > I'm running trace with next command: > > valgrind --trace-children=yes --tool=callgrind /usr/local/nginx/sbin/nginx > > And as result got > > > root@bt:~# ==1975== > ==1975== Error: can not open cache simulation output file > `/root/callgrind.out.1975' I also tried to do same thing under regular user from home directory and got the same result -- Best wishes, Steph. |
|
From: Josef W. <Jos...@gm...> - 2013-01-22 16:32:46
|
Am 22.01.2013 12:46, schrieb Steph: >> root@bt:~# ==1975== >> ==1975== Error: can not open cache simulation output file >> `/root/callgrind.out.1975' > > I also tried to do same thing under regular user from home directory and > got the same result You mean you get: ==1975== Error: can not open cache simulation output file `/root/callgrind.out.1975' ? If so, then for some reason, /usr/local/nginx/sbin/nginx switches to "/root" first, and spawns subprocess 1975 there. Did you try with option --callgrind-out-file=... as Philippe suggested? E.g. using "--callgrind-out-file=<your home path>/callgrind.%p". The %p is replaced by the PID. This is needed if nginx spawns multiple processes. Without %p, the processes would overwrite their output. Josef |
|
From: Josef W. <Jos...@gm...> - 2013-01-15 14:15:43
|
Am 15.01.2013 07:36, schrieb Steph: > Hello everyone! > Got strange problem while tracing nginx using callgrind. > > I'm running trace with next command: > > valgrind --trace-children=yes --tool=callgrind /usr/local/nginx/sbin/nginx > > And as result got > > > root@bt:~# ==1975== > ==1975== Error: can not open cache simulation output file > `/root/callgrind.out.1975' Are you allowed to create a file in "/root" ? Anyway, you should not run valgrind as root. The file is written into the directory where you start callgrind. Josef > ==1958== > ==1958== Events : Ir > ==1958== Collected : 82162617 > ==1958== > ==1958== I refs: 82,162,617 > > > valgrind version is 3.8.0. > Nginx (nginx/1.3.7) > > I read that this problem should be fixed in 3.5.0 isn't it? > > -- > Best wishes, Steph. > > > ------------------------------------------------------------------------------ > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS > and more. Get SQL Server skills now (including 2012) with LearnDevNow - > 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only - learn more at: > http://p.sf.net/sfu/learnmore_122512 > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: Philippe W. <phi...@sk...> - 2013-01-15 20:09:54
|
On Tue, 2013-01-15 at 15:15 +0100, Josef Weidendorfer wrote: > Am 15.01.2013 07:36, schrieb Steph: > > root@bt:~# ==1975== > > ==1975== Error: can not open cache simulation output file > > `/root/callgrind.out.1975' > > Are you allowed to create a file in "/root" ? > Anyway, you should not run valgrind as root. > > The file is written into the directory where you start callgrind. Using root is effectively not ideal. Alternatively, --callgrind-out-file can be used to have the file given another directory/name. Philippe |