basic questions to strace
Eugene Syromyatnikov
evgsyr at gmail.com
Fri Oct 7 16:21:36 UTC 2016
On Fri, Oct 7, 2016 at 4:08 PM, Lentes, Bernd
<bernd.lentes at helmholtz-muenchen.de> wrote:
>
>
> ----- On Oct 7, 2016, at 3:59 PM, Eugene Syromyatnikov evgsyr at gmail.com wrote:
>
>
>>> Starting a process give me this error in the log:
>>> traps: nsrexecd[12162] general protection ip:7f085e4cb960 sp:7f085a4e9278
>>> error:0 in libpthread-2.23.so[7f085e4b9000+18000]
>>> It seems that the kernel is stopping the process because of ... what with a
>>> signal.
>> For debugging segmentation faults, i'd recommend installing debuginfo packages,
>> enabling core file saving and then checking them out with gdb, usually it allows
>> pinpointing problem rather quickly.
>
> Is that a segmentation fault ?
Well, I assume so by "general protection" message from your excerpt,
which is printed when there is unhandled SIGSEGV, iirc.
>
>> Clone is rather comprehensive syscall by means that it is used for several
>> different tasks. Which arguments are used depends on flags provided, and strace
>> prints only arguments actually used (for brevity, i suppose). Syscall arguments
>> parsing for clone call is done as follows (clone.c in strace source):
>>
>
> Ah. So clone is called with all arguments but strace shows just the relevant ?
> Does strace have this behaviour also with other system calls ?
Yes. futex, fcntl, prctl, quotact, keyctl, ptrace are examples of such syscalls.
>>> What means the return code 13025 ? I didn't find anything about it in the net.
>>> Is there s.th. where i can get further information ?
>> On success, clone returns ID of the child process to the parent. You can check
>> it out in the "RETURN VALUE" section of the manual.
>>
>
> Sorry, i didn't read completely. Because the return code was != 0, i thought it's an error code.
Some syscalls return positive values in case of success, mostly the
ones which provide fd as a result, but there are other examples of
such behaviour. Only negative value indicates an error (in all cases
i'm aware of, at least).
>>> I installed the kernel sources and searched for a file like clone.h or clone.c,
>>> but didn't find anything.
>> Please check out kernel/fork.c file in kernel tree, it contains
>> SYSCALL_DEFINE[56](clone, ...), which calls _do_fork().
>>
>
> I installed the debian-kerbel via apt.
> But it didn't install it completely, just downloaded a tar which i need to extract manually.
> Why do i have a package management ?
There is linux-source package available in Debian. You can also do
apt-get source linux-image and obtain deb-src which would also contain
kernel sources.
>
> Bernd
>
>
> Helmholtz Zentrum Muenchen
> Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
> Ingolstaedter Landstr. 1
> 85764 Neuherberg
> www.helmholtz-muenchen.de
> Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
> Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Alfons Enhsen
> Registergericht: Amtsgericht Muenchen HRB 6466
> USt-IdNr: DE 129521671
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel
--
Eugene "eSyr" Syromyatnikov
mailto:evgSyr at gmail.com
xmpp:eSyr at jabber.{ru|org}
More information about the Strace-devel
mailing list