Sources for system libraries (e.g. sysdeps/unix/clock_gettime.c)

21 views
Skip to first unread message

Łukasz Anforowicz

unread,
Mar 5, 2018, 7:00:33 PM3/5/18
to Chromium OS dev, Yuri Wiitala
Hello,

I am looking at a crash (https://crbug.com/818214) that happens more often in a specific Finch trial and seems to be happen inside system libraries.

QUESTION: How can I look at the sources of the CrOS system libraries (where the crash seems to happen)?

Example callstacks where I'd like to understand what is going on:

Example1:
0xb0b8fb36 (libc-2.23.so + 0x00016b36) __libc_do_syscall
0xb0c1a7dd (libc-2.23.so - clock_gettime.c: 99) __clock_gettime
0xb17dcd39 (chrome - time_now_posix.cc: 53) base::subtle::TimeTicksNowIgnoringOverride()
0xb2ed55f7 (chrome - time.cc: 332) base::TimeTicks::Now()
... 

Example2:

0x00007ffc60903a24 (linux-gate.so -vgtod.h:45 ) __vdso_clock_gettime
0x00007ccc66a66948 (libc-2.23.so -clock_gettime.c:115 ) __clock_gettime
0x000056deba228a82 (chrome -time_now_posix.cc:53 ) base::subtle::TimeTicksNowIgnoringOverride()
...

Example3:
0x00007ffc4f9728fe (linux-gate.so -vclock_gettime.c:35 ) vgetsns
0x00007ffc4f972a2e (linux-gate.so -vclock_gettime.c:262 ) __vdso_clock_gettime
0x00007c9497255948 (libc-2.23.so -clock_gettime.c:115 ) __clock_gettime
0x000057025179bc62 (chrome -time_now_posix.cc:53 ) base::subtle::TimeTicksNowIgnoringOverride() 
...


Thanks,

Lukasz

PS. I am a Chromium developer, but I am not at all familiar with CrOS development.  Please redirect me to another more appropriate discussion alias as needed.  Please be gentle :-)

Wez

unread,
Mar 5, 2018, 8:32:35 PM3/5/18
to Łukasz Anforowicz, Chromium OS dev, Yuri Wiitala
Hi Lukasz,

The crash is caused by SIGABRT, which is sent to Chrome processes by the ChromeOS Login/Session Manager if it thinks that the session has "hung" (based on whether it pings the Browser process via DBus and sees a timely response, IIRC).

So IIUC the fact that this is crashing in Now() is just because that it making a syscall, at which point the signal is processed. Since the browser process is presumably not responding to pings, to have provoked the session manager to kill it, it may be that it's actually stuck in a loop processing the incoming gesture event(s)?

Wez


--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Mike Frysinger

unread,
Mar 6, 2018, 9:31:40 PM3/6/18
to Łukasz Anforowicz, Chromium OS dev, Yuri Wiitala
currently glibc, and many system libs, don't have their source pulled out specifically.  so you'd have to manually recreate the source repo :/.

that said, libc-2.23.so is glibc-2.23, and you can view (mostly in sync) sources here:

linux-gate is much trickier as that's code that comes from the kernel itself (some of which is generated).  although you rarely need to actually look in that file as they tend to be very thin stubs over the corresponding syscall.

in general, CrOS needs to invest time in something like Chromium's cs.chromium.org system which manages to integrate compiled source files as well.
-mike

--
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages