Segmentation fault during build 'Debug' version of chromium

144 views
Skip to first unread message

Gary Wang

unread,
Jul 24, 2016, 11:03:22 PM7/24/16
to Chromium-dev

Hi All,

 

I suffered from seg-fault in building Debug version of chromium. There is no this error for building Release version of chromium (in my Ubuntu 14.04.4 LTS).


[3162/23362] RULE Generating C++ code from subresource_filter/core/common/flat/rules.fbs

FAILED: gen/flatc_out/components/subresource_filter/core/common/flat/rules_generated.h

cd ../../components; ../out_amd64-generic/Debug/flatc -c -o ../out_amd64-generic/Debug/gen/flatc_out/components/subresource_filter/core/common/flat "subresource_filter/core/common/flat/rules.fbs"

Segmentation fault (core dumped)

[3181/23362] CXX obj.host/v8/src/runtime/v8_base.runtime-simd.o

ninja: build stopped: subcommand failed.


Anyone also got the same problem? I’m still checking it.

 

Thanks!

 

Gary

Jochen Eisinger

unread,
Jul 25, 2016, 5:17:53 AM7/25/16
to zcw...@gmail.com, Chromium-dev

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Gary Wang

unread,
Aug 1, 2016, 11:35:58 PM8/1/16
to Jochen Eisinger, eng...@chromium.org, Chromium-dev

I used the latest chromium git commit (cd237c6 Added experimental Web Share API on Android behind flag.) but still suffered it.

ninja: Entering directory `out_amd64-generic/Debug'

[2/20182] RULE Generating C++ code from subresource_filter/core/common/flat/rules.fbs

FAILED: gen/flatc_out/components/subresource_filter/core/common/flat/rules_generated.h

cd ../../components; ../out_amd64-generic/Debug/flatc -c -o ../out_amd64-generic/Debug/gen/flatc_out/components/subresource_filter/core/common/flat "subresource_filter/core/common/flat/rules.fbs"

Segmentation fault (core dumped)

Lei Zhang

unread,
Aug 2, 2016, 12:04:19 AM8/2/16
to Gary Wang, Jochen Eisinger, eng...@chromium.org, Chromium-dev
If you start out in src/components, and run the exact command that
failed: ../out_foo/Debug/flatc -c ...

Does that also segfault? If so, the next step is to run: gdb
../out_foo/Debug/flatc -c ..., and then get a backtrace to figure out
what's wrong. I don't see anyone else complaining, so you need to
provide more diagnostic data.

On Mon, Aug 1, 2016 at 8:32 PM, Gary Wang <zcw...@gmail.com> wrote:
> I used the latest chromium git commit (cd237c6 Added experimental Web Share
> API on Android behind flag.) but still suffered it.
>
> …
>
> ninja: Entering directory `out_amd64-generic/Debug'
>
> [2/20182] RULE Generating C++ code from
> subresource_filter/core/common/flat/rules.fbs
>
> FAILED:
> gen/flatc_out/components/subresource_filter/core/common/flat/rules_generated.h
>
> cd ../../components; ../out_amd64-generic/Debug/flatc -c -o
> ../out_amd64-generic/Debug/gen/flatc_out/components/subresource_filter/core/common/flat
> "subresource_filter/core/common/flat/rules.fbs"
>
> Segmentation fault (core dumped)
>
> …
>
>
> Sincerely, ~Gary Wang~
> Facebook: http://www.facebook.com/crazygary
> Albums: www.flickr.com/photos/garywang2007
> Twitter: http://twitter.com/garywang
>
> On Mon, Jul 25, 2016 at 5:16 PM, Jochen Eisinger <joc...@chromium.org>
> wrote:
>>
>> +eng...@chromium.org

Nico Weber

unread,
Aug 2, 2016, 7:23:14 AM8/2/16
to Lei Zhang, Gary Wang, Jochen Eisinger, eng...@chromium.org, Chromium-dev
I've seen flatc crashes in a few places (I think including locally, but I'm not sure). https://crbug.com/630364

We had to teach lld some tricks to work with the target (https://reviews.llvm.org/D21171). It seems flatc has some flimsy dependency on --as-needed working well; it'd be good to make it less flimsy.

Lei Zhang

unread,
Aug 2, 2016, 12:52:00 PM8/2/16
to Nico Weber, Gary Wang, Jochen Eisinger, eng...@chromium.org, Chromium-dev
Well, glad to see Gary isn't alone. Now let's see if we can make that
bug public...

Balazs Engedy

unread,
Aug 5, 2016, 8:05:14 AM8/5/16
to Lei Zhang, Nico Weber, Gary Wang, Jochen Eisinger, Chromium-dev
My understanding is that this happens only for GYP and only for CrOS, where the chrome-sdk shell blatantly sets "-Wl,--as-needed" in LDFLAGS, rendering our workaround for the `lld` bug ineffective.

Fixing the flags that are set through LDFLAGS would be the cleanest solution, but unsure how easily it can be propagated to all SDK versions. Lacking that, we could build `flatc` without "-pthread", although this could be less trivial than it sounds given how our GN configs are structured. Or, we could link all targets unconditionally against libpthread in all build configurations, not only when "-Wl,--as-needed" is specified. 

Other than that, I am not sure if there is anything to fix with `flatc` itself. The segfault would be exhibited by any single-threaded target, as demonstrated by this 6 line repro.
Reply all
Reply to author
Forward
0 new messages