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

Issue 688441 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Segfault launching chrome profile(s) after laptop battery died (corrupt "Local State" file)

Reported by sgla...@evergage.com, Feb 3 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.19 Safari/537.36

Steps to reproduce the problem:
1. Machine powers off suddenly (laptop dies)
2. Launch browser on reboot

What is the expected behavior?
Browser Launch

What went wrong?
After my laptop ran out of battery, I booted back up, logged back in, and couldn't launch chrome.  When launched from the command line, this is all I get:

<prompt>: google-chrome --user-data-dir=/home/scott/.config/google-chrome-unstable/ --ignore-certificate-errors --test-type --enable-benchmarking --password-store=basic
Segmentation fault (core dumped)

All of the instructions to help enable debugging don't seem to help, as the crash probably happens too quick during the startup cycle.

However I WAS able to get my chrome profile working again via trail and error deleting files or sections of files in the chrome profile directory.

I have 3 chrome profiles I use, with different folders.  My main work profile (labeled "work"), my secondary work profile (labeled "old"), and my "home" accounts profile (labeled "home").  These live in 3 directories, and my chrome start scripts point at the different directories.  THe start script used above points at the "work" profile.

What happened is that the "work" profile segfaulted on startup.  I tried the "old" profile, and it seemed to work.  At this point my chrome was at version "57.0.2987.8-1".  I noticed in the package manager that there was a newer version available, so I updated chrome.  During the update no chrome processes were running (verified using "ps aux | grep chrome").  Now on version "57.0.2987.19-1", I tried the "work" profile, which still segfaulted.  I then tried the "old" profile again, which now started segfaulting!  I then tried my "home" profile, which did work.

How did I get my profile working again?
My process was copy off the broken profile to a new folder.  Launch chrome pointing at that folder, and delete files until chrome launched correctly. 
 Rinse and repeat until I found the file or file contents that were causing the issue.
In the "Local State" file directly in the chrome profile folder, if I delete the JSON properties near the end that all start with "variations_", then I could launch the chrome profile again.

AFTER repairing the chrome profile and proving that chrome can launch again, I shut down chrome and re-inserted the bad "variations_" section into Local State.  Then when I launched chrome, instead of a segfault, on the command line it said generating a crash report.
I was able to do this twice, and the crash IDs for these are "da8b145580000000" and "1077e45580000000".  Since this isn't exactly what went wrong the originally (the segfaults), these crash reports may or may not be useful to you. 

Crashed report ID: Sort of

How much crashed? Whole browser

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Chrome version: 57.0.2987.19  Channel: canary
OS Version: Mint 17 Qiana
Flash Version: Shockwave Flash 24.0 r0

My guess is that there is some sort of regression in the "variations_" fields in the "Local State" file for the chrome profile, such that if it isn't written correctly at shutdown or something like that, corruption happens.

If you need any other system info, or contents of the corrupted chrome profile, let me know.  I'll keep a copy of the corrupted chrome profile off to the side in case you need to inspect it in some way.

 

Comment 1 by ajha@chromium.org, Feb 6 2017

Labels: Needs-Triage-M57
A little bit of more data, while patching that "Local State" file worked for me for a little while, it seems the problematic state seems to reoccur while I'm using the browser.  Once I'm in this state, if I click on a link in an external program, the link wouldn't open, because the browser launch would crash.

To remedy this, I've changed my chrome start script to strip out these lines before launching every time.

jsonlint -f "/home/scott/.config/google-chrome-unstable/Local State" | grep -v "\"variations_" > /tmp/local_state_temp
cp /tmp/local_state_temp "/home/scott/.config/google-chrome-unstable/Local State"
google-chrome --user-data-dir=/home/scott/.config/google-chrome-unstable/ --ignore-certificate-errors --test-type --enable-benchmarking --password-store=basic $@ &

Cc: brajkumar@chromium.org
Labels: Needs-Feedback
sglajch@ Could you please let us know is there any sample crash ID's available under chrome://crashes for this issue.

Thanks!
Cc: jwd@chromium.org
Components: Internals>Metrics
Owner: asvitk...@chromium.org
It looks like those were provided:

"crash IDs for these are "da8b145580000000" and "1077e45580000000"."

0x00007fea04fff796	(chrome -./out/Release/gen/components/variations/proto/study.pb.h:1907 )	variations::VariationsSeedProcessor::CreateTrialFromStudy(variations::ProcessedStudy const&, base::Callback<void (unsigned int, std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, base::FieldTrial::EntropyProvider const*, base::FeatureList*)
0x00007fea04fff1ba	(chrome -./out/Release/../../components/variations/variations_seed_processor.cc:194 )	variations::VariationsSeedProcessor::CreateTrialsFromSeed(variations::VariationsSeed const&, std::string const&, base::Time const&, base::Version const&, variations::Study_Channel, variations::Study_FormFactor, std::string const&, std::string const&, std::string const&, base::Callback<void (unsigned int, std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, base::FieldTrial::EntropyProvider const*, base::FeatureList*)
0x00007fea030eda05	(chrome -./out/Release/../../components/variations/service/variations_service.cc:346 )	variations::VariationsService::CreateTrialsFromSeed(base::FeatureList*)
0x00007fea01daf620	(chrome -./out/Release/../../chrome/browser/chrome_browser_main.cc:739 )	ChromeBrowserMainParts::SetupFieldTrials()


There's a crash annotation "20 crashes are from same client idby kavvaru@ -- 1 year ago"

I'm not sure what lengths we can go to in order to help users recover from corrupt user data directories (but poking around that question is how I got here, via Issue 696952 [Mac])
Cc: tapted@chromium.org
We actually validate the seed bytes using a sha1 signature. If the data is corrupted, we will not try to create trials from it.

A crash with that trace shouldn't happen when data coming from the file is corrupt. It would signal something more like memory corruption while Chrome is running.
sglajch: Have you tried running a memory test on your machine? The crash sounds like it could be caused by bad RAM.
Good question!  I will do a memory test (probably a memtest from a linux live boot USB drive) tonight on the machine.  If we are thinking corrupt memory here, I can also try and copy the profile dir to a different machine with the same chrome version and run it there.  This is actually my work laptop which is getting close to 5 years old now.
Project Member

Comment 9 by sheriffbot@chromium.org, Mar 7 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "brajkumar@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
sglajch@ : Gentle ping..!Please update your findings to help further progress in it.
Sorry for the delay.  The machine in question is now my old work machine as my new machine came right about the time you asked for memory test.  Also the old machine didn't work with the memtest I tried, I think because it's a macbook and uses EFI, which requires a different version of memtest.

For a while it was booting but as of today and I can't boot past the grub bootloader, so for a while I was assuming it was bad hardware, BUT....

My new machine, which I setup using the same launch script, was working for that first month, but as of yesterday, it started segfaulting as well upon launch.

After some more investigation, it looks like omitting the "-enable-benchmarking" flag made my browser successfully again.  While I remembered the reason for all the other flags I was using on startup, I don't know why I had this one flag set in the first place.  It's worth noting that my hack of removing the "variations_" fields in the Local State file like I did for the old machine above also "fixed" it in that I was able to launch chrome (even with the --enable-benchmarking flag) by removing those fields first.

So given that this has happened on 2 machines (assuming it's the same issue), it may be some weird bug or oddity of using the --enable-benchmarking flag?

I can try and see if I can run memtest on the new machine, but given that it's brand new I think hardware is doubtful to be the cause.
Project Member

Comment 12 by sheriffbot@chromium.org, Apr 5 2017

Cc: durga.behera@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "durga.behera@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
FWIW, the --enable-benchmarking flag is not intended for use by regular Chrome users; it's only intended to be used for automated testing.  I would not be particularly surprised to learn that having this flag enabled during regular usage destabilizes the Chrome app.  I'm inclined to close this bug if you're only seeing issues while that flag is enabled.
Closing the bug sounds fine to me.  I do write automated UI tests with Selenium, so probably at one point I was playing around with flags for something and just forgot to turn that one off.  Thanks for the help!
Status: WontFix (was: Unconfirmed)

Sign in to add a comment