New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640082 link

Starred by 7 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Unable to switch to VT2

Project Member Reported by alemate@chromium.org, Aug 23 2016

Issue description

Freecon crashes on peppy device like this:

2016-08-22T21:20:50.672943-07:00 NOTICE kernel: [    1.505097] frecon(211): Frecon using drm driver i915, version 1.6, date(20080730), desc(Intel Graphics)
2016-08-22T21:20:54.075843-07:00 NOTICE kernel: [    5.082566] frecon(211): Chrome started, splash screen is not needed anymore.
2016-08-22T21:20:57.373670-07:00 NOTICE kernel: [    8.863508] frecon(211): Activated existing terminal 0x7f6ea3deb150 on VT1
2016-08-22T21:20:58.589803-07:00 NOTICE kernel: [   10.079899] frecon(211): Activated existing terminal 0x7f6ea3deb150 on VT1
2016-08-22T21:20:59.222665-07:00 NOTICE kernel: [   10.713004] frecon(211): Activated existing terminal 0x7f6ea3deb150 on VT1
2016-08-22T21:20:59.775646-07:00 INFO kernel: [   11.266024] frecon[211]: segfault at 10 ip 00007f6ea24a99d5 sp 00007ffe9a069320 error 4 in frecon[7f6ea24a3000+13000]
2016-08-22T21:20:59.805212-07:00 WARNING crash_reporter[6296]: [user] Received crash notification for frecon[211] sig 11, user 0 (developer build - not testing - always dumping)
2016-08-22T21:20:59.825524-07:00 INFO crash_reporter[6296]: Stored minidump to /var/spool/crash/frecon.20160822.212059.211.dmp
2016-08-22T21:20:59.825548-07:00 INFO crash_reporter[6296]: Leaving core file at /var/spool/crash/frecon.20160822.212059.211.core due to developer image

To reproduce, you should boot, switch to VT-2 and then back (before console content appears). Then back to VT-2.
 
Cc: abod...@chromium.org dhadd...@chromium.org sdantul...@chromium.org
Labels: -Pri-2 M-54 Pri-1
Repr'd on Chrome OS version 54.2831.0/8730.0.0  samus and cyan too

Comment 2 by dbehr@chromium.org, Aug 23 2016

Status: Started (was: Assigned)

Comment 3 by dbehr@chromium.org, Aug 25 2016

Well, I narrowed it down to when frecon child process calls grantpt() to set up pty.
Internally in glibc grantpt() calls getgrnam_r()
And when we switch quickly to frecon and back, getgrnam_r fails in a way that makes frecon child process die, and any future attempt fails as well.
getgrnam_r loads nss library and does a lot of stuff.
I found another problem:

localhost ~ # grep frecon /var/log/messages 
2016-08-25T21:59:15.973802+00:00 NOTICE kernel: [    1.508339] frecon(214): Frecon using drm driver i915, version 1.6, date(20080730), desc(Intel Graphics)
2016-08-25T21:59:15.973810+00:00 NOTICE kernel: [    3.681139] frecon(214): Cannot get DBUS connection
2016-08-25T21:59:15.976122+00:00 NOTICE kernel: [    3.985485] frecon(214): DBUS connected after 0.3 seconds
2016-08-25T21:59:21.449064+00:00 NOTICE kernel: [    9.453889] frecon(214): Chrome started, splash screen is not needed anymore.
localhost ~ # 


And it doesn't work ;(

(latest canary on peppy)

Comment 5 by dbehr@chromium.org, Aug 26 2016

Cc: alemate@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/frecon/+/f93299126ed4bb05f37ae181a3a82fa6697e2186

commit f93299126ed4bb05f37ae181a3a82fa6697e2186
Author: Dominik Behr <dbehr@chromium.org>
Date: Fri Aug 26 00:31:52 2016

frecon: fix segfault when creating a terminal fails

This change fixes frecon segfault when terminal initialization fails by only
operating on valid terminal objects. Also it adds multiple error messages to
make terminal creation debugging easier.

BUG= chromium:640082 
TEST=switch to VT2 and back to VT1 immediately

Change-Id: Iee255c35a7545515396442c9c444966535c21d51
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/379416
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/f93299126ed4bb05f37ae181a3a82fa6697e2186/term.c

Cc: dchan@chromium.org krishna...@chromium.org
 Issue 643856  has been merged into this issue.

Comment 8 by dbehr@chromium.org, Sep 9 2016

Does anyone still see this in ToT?
I have seen this problem on my Chromebooks only when I attach GDB to frecon process and then the child console processes die when calling grantpt() (which calls getgrnam_r() which loads whole bunch of libnss libs). But I haven't found a reliable way to repro it otherwise.
I think calling getgrnam_r to preload these libraries in main frecon process at startup fixes it because then children inherit already preloaded libraries but it  I have no idea what is the root causes of this behavior and what causes the process to die in first place (security stuff maybe?).
Could always repro in M54.

No specific steps required.Observed in devices like Peppy,Daisy,Reks,Candy

Comment 10 by ka...@chromium.org, Sep 14 2016

Cc: sontis@chromium.org helenzhang@chromium.org ka...@chromium.org shrawan@chromium.org
 Issue 646974  has been merged into this issue.

Comment 11 by dchan@google.com, Sep 14 2016

Labels: ReleaseBlock-Stable
Cc: abodenha@chromium.org rookrishna@chromium.org
 Issue 646976  has been merged into this issue.
Still able to reproduce hang & frecon crash issue on cyan in ChromeOS build 8743.44.0 / 54.0.2840.43 after switching between VT2-VT1 several times. 
Unable to switch to VT2

M	ChromeOS	Chrome	ARC	Type	Channel
54	8743.57.0	54.0.2840.51	3327608	release	beta
dbehr@, any update on this?

Comment 17 by trapti@google.com, Oct 13 2016

any updates?Still able to repro in M54.
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 13 2016

Labels: merge-merged-release-R54-8743.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/frecon/+/c90a18276abb75c6b80080db924eb6511ba080ee

commit c90a18276abb75c6b80080db924eb6511ba080ee
Author: Dominik Behr <dbehr@chromium.org>
Date: Fri Aug 26 00:31:52 2016

frecon: fix segfault when creating a terminal fails

This change fixes frecon segfault when terminal initialization fails by only
operating on valid terminal objects. Also it adds multiple error messages to
make terminal creation debugging easier.

BUG= chromium:640082 
TEST=switch to VT2 and back to VT1 immediately

Change-Id: Iee255c35a7545515396442c9c444966535c21d51
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Previous-Reviewed-on: https://chromium-review.googlesource.com/379416
(cherry picked from commit 8a79ec552867e05279dbd5fcaeca67a4f0212f01)
Reviewed-on: https://chromium-review.googlesource.com/398478
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/c90a18276abb75c6b80080db924eb6511ba080ee/term.c

Is there any other pending CLs? 
If not, please go ahead and mark this as fixed so it can be verified. 

btw. do we need to merge this to M55 too?
Status: Fixed (was: Started)
Original cl landed before M55 so this should not be needed there.

Marking as fixed to get this verified 

Comment 21 by dchan@chromium.org, Oct 19 2016

Components: Platform>DevTools
Status: Verified (was: Fixed)
Verified on 54.0.2840.68/8743.69.0 cyan

Sign in to add a comment