[m-dev.] hang-up in C-code in asm_fast.gc.prof
Ondrej Bojar
bojar at csse.unimelb.edu.au
Thu May 24 18:05:03 AEST 2007
To make things worse, the hang-up does not occur if a different dataset is used.
Several files opened in the course of computation. The C-code has its own file,
the Mercury code uses different files to load different things.
- for the C-code I keep exactly the same input file to be loaded (part of which
is the deletion of the temporary file)
- for Mercury code, I replace the input file with a shorter one.
=> the error does not occur, although the very same system call is performed in
the C-code.
O.
Ondrej Bojar wrote:
> > The benchmarking module contains some predicates to turn profiling on
> > and off. What happens if you disable profiling before your system
> call and
> > enable it afterwards? (I know that defeats the purpose of profiling,
> > but ...)
> >
> > Julien.
>
>
> Hangs right in the call to system(cmd):
>
> 2-grams: reading 638323 entries
>
> Breakpoint 1, removefile (filePath=@0x7fffd8a71840) at util.cpp:51
> 51 sprintf(cmd,"rm %s",filePath.c_str());
> Current language: auto; currently c++
> (gdb) step
> 52 system(cmd);
> (gdb) step
> <hangs forever>
>
> O.
>
>
>> On Thu, 24 May 2007, Ondrej Bojar wrote:
>>
>>> If I understand it correctly, a profiler tick happens at the call to
>>> system(cmd). After some further steps within the profiler, a
>>> do_system in libc is called and hangs forever.
>>>
>>> Breakpoint 1, removefile (filePath=@0x7fff43730500) at util.cpp:51
>>> 51 sprintf(cmd,"rm %s",filePath.c_str());
>>> Current language: auto; currently c++
>>> (gdb) print filePath
>>> $1 = (const string &) @0x7fff43730500: {static npos =
>>> 18446744073709551615,
>>> _M_dataplus = {<std::allocator<char>> =
>>> {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
>>> fields>}, _M_p = 0x6ca7e078 "/tmp/dskbuff--IpMvxN"}}
>>> (gdb) step
>>> 52 system(cmd);
>>> (gdb) step
>>> prof_handle_tick (signum=27) at mercury_prof.c:199
>>> 199 mercury_prof.c: No such file or directory.
>>> in mercury_prof.c
>>> Current language: auto; currently c
>>> (gdb) step
>>> 207 in mercury_prof.c
>>> (gdb) step
>>> 213 in mercury_prof.c
>>> (gdb) finish
>>> Run till exit from #0 prof_handle_tick (signum=27) at
>>> mercury_prof.c:223
>>> <signal handler called>
>>> (gdb) step
>>> Single stepping until exit from function __restore_rt,
>>> which has no line number information.
>>> 0x00000037a6d3ac50 in system () from /lib64/libc.so.6
>>> (gdb) step
>>> Single stepping until exit from function system,
>>> which has no line number information.
>>> 0x00000037a6d3a7f0 in do_system () from /lib64/libc.so.6
>>> (gdb) step
>>> Single stepping until exit from function do_system,
>>> which has no line number information.
>>> <hangs forever>
>>>
>>> Any ideas whose fault is this? Any secure means to prevent that?
>>>
>>
>> --------------------------------------------------------------------------
>>
>> mercury-developers mailing list
>> Post messages to: mercury-developers at csse.unimelb.edu.au
>> Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
>> Subscriptions: mercury-developers-request at csse.unimelb.edu.au
>> --------------------------------------------------------------------------
>>
>
> --------------------------------------------------------------------------
> mercury-developers mailing list
> Post messages to: mercury-developers at csse.unimelb.edu.au
> Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
> Subscriptions: mercury-developers-request at csse.unimelb.edu.au
> --------------------------------------------------------------------------
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions: mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the developers
mailing list