Network stuck in app using 3809?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Network stuck in app using 3809?

Postby DanKegel » Tue Sep 03, 2019 2:59 pm

Hi!
3809's cefclient works fine, but our app with a few quick changes to build against 3809 doesn't do any networking.
Given my lack of true familiarity with CEF, that's not surprising; I must have missed something important.

Running with -v=1 shows a nice plausible line:

[0903/124413.265945:VERBOSE1:network_delegate.cc(32)] NetworkDelegate::NotifyBeforeURLRequest: http://www.google.com/

but not the following line for https://www.google.com that cefclient -v=1 shows.

Also, strace seems to show that our app never really resolves that hostname with 3809 (whereas cefclient does).

I've glanced at https://bitbucket.org/chromiumembedded/ ... orkservice and a few associated changesets, but haven't looked at the cefclient changes much yet to see how to migrate an app to 3809 properly.
DanKegel
Mentor
 
Posts: 59
Joined: Fri Nov 08, 2013 12:46 pm

Re: Network stuck in app using 3809?

Postby magreenblatt » Tue Sep 03, 2019 3:03 pm

What OS? How does your app differ from cefclient?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Network stuck in app using 3809?

Postby DanKegel » Mon Sep 09, 2019 1:53 pm

The problem only happens on linux. (Our app seems to work fine with cef 3809 on mac os 10.14.)

The app is... rather different from cefclient. I'll have to try to dissect the differences, I guess.

First difference is that the cef is installed in a central location, shared by multiple
apps. https://github.com/dankegel/tinycef/tree/master/linux is a cefsimple
that uses a shared cef. That works fine with 3809, so I guess I'll keep looking.
DanKegel
Mentor
 
Posts: 59
Joined: Fri Nov 08, 2013 12:46 pm

Re: Network stuck in app using 3809?

Postby DanKegel » Mon Sep 09, 2019 6:53 pm

So... I'm looking for a way of tracing what's going on during startup.

I'm building my app against a debug build of cef 3809, and tried passing -v --log-level=0 --enable-logging=stderr to my app.
Starting and then quitting the app yields a few lines in the log which seem to be errors during shutdown, but nothing before them:

[0909/164740.373723:ERROR:browser_process_sub_thread.cc(203)] Waited 3 ms for network service
[0909/164740.374194:ERROR:process_posix.cc(330)] Unable to terminate process 25825: No such process (3)

On a whim, I also tried --log-net-log=/tmp/blah.json but that aborts with a pretty backtrace.
(Enabling it by browsing to chrome://net-export is better behaved, but since my app only shows one window or tab, I can't switch away from the capture window to log anything, and I suspect I'm interested in something that happens in startup anyway.)

How would one turn on verbose enough logging that one could tell what's going on with chromium's network service?
DanKegel
Mentor
 
Posts: 59
Joined: Fri Nov 08, 2013 12:46 pm

Re: Network stuck in app using 3809?

Postby magreenblatt » Mon Sep 09, 2019 7:27 pm

Using log-net-log on the command-line seems like the best option. You might want to start by fixing the crash (PRs welcome if it’s an issue with CEF).
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Network stuck in app using 3809?

Postby DanKegel » Wed Sep 11, 2019 2:09 pm

Happily, --log-net-log only fails an assert, so I can use it with a release build.
(Filed https://bitbucket.org/chromiumembedded/ ... bug-builds for the assertion.)

Here's the output of https://netlog-viewer.appspot.com for my app's log:

1 NETWORK_QUALITY_ESTIMATOR
2 COOKIE_STORE
3 COOKIE_STORE
4 HTTP_SERVER_PROPERTIES
5 NONE DNS_CONFIG_CHANGED

Not especially surprising, given the symptoms I saw.

--net-log-capture-mode=IncludeSocketBytes and --net-log-capture-mode=IncludeCookiesAndCredentials don't seem to change the output.

Guess I'll put on my big boy shoes and try single-stepping. Gulp...


Is there a way to crank up more logging?
Last edited by DanKegel on Wed Sep 11, 2019 2:26 pm, edited 1 time in total.
DanKegel
Mentor
 
Posts: 59
Joined: Fri Nov 08, 2013 12:46 pm

Re: Network stuck in app using 3809?

Postby magreenblatt » Wed Sep 11, 2019 2:18 pm

Using the web app can you click on the individual lines for more information?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Network stuck in app using 3809?

Postby DanKegel » Thu Sep 12, 2019 2:25 pm

Thanks. So far the extra detail hasn't been illuminating offhand, but:

I forgot to mention that the problem happens in my own build of cef, ahem.
I tried linking our app against a spotify build of 3729, and it worked.
Then I tried the same with a spotify build of 3809... and that worked, too.

My cef build has no patches, it just turns on h.264 by setting a few build flags (not sure if we still need GYP_DEFINES?):

export GN_DEFINES="ffmpeg_branding=Chrome is_official_build=true proprietary_codecs=true remove_webcore_debug_symbols=true symbol_level=1 use_allocator=none use_sysroot=true"
export GYP_DEFINES="buildtype=Official disable_nacl=1 use_allocator=none use_sysroot=true"

Whew. So it's probably something boring like "you built it wrong" or "you swizzled installed files wrong".
I'll keep looking.
DanKegel
Mentor
 
Posts: 59
Joined: Fri Nov 08, 2013 12:46 pm

Re: Network stuck in app using 3809?

Postby DanKegel » Fri Sep 13, 2019 6:44 am

Progress. Building locally with

python automate-git.py --download-dir=$(pwd)/downloadedsrc --branch=3809 --x64-build --force-clean

and linking against the result works. Now to bisect on build commands. The build that generated a bad cef used the commands

+ CEFBRANCH=3809
+ export CEF_USE_GN=1
+ export GN_DEFINES=ffmpeg_branding=Chrome is_official_build=true proprietary_codecs=true remove_webcore_debug_symbols=true symbol_level=1 use_allocator=none use_sysroot=true
+ export GYP_DEFINES=buildtype=Official disable_nacl=1 use_allocator=none use_sysroot=true
+ export CEF_ARCHIVE_FORMAT=tar.bz2
+ python automate-git.py --minimal-distrib --client-distrib --x64-build --build-target=cefsimple --force-clean --url=/home/buildbot/slave-state/cef-3809-normal-ubu1804/build/.git --download-dir=/home/buildbot/slave-state/cef-3809-normal-ubu1804/build/tmp/downloadedsrc --branch=3809

where that url is just buildbot's checkout of my fork of cef; I can omit that parameter for 3809 (previous branches needed patches here, but 3809 doesn't).

Thank goodness for i9-9900k's and --no-debug-build...
DanKegel
Mentor
 
Posts: 59
Joined: Fri Nov 08, 2013 12:46 pm

Re: Network stuck in app using 3809?

Postby Czarek » Fri Sep 13, 2019 9:52 am

The build parameters look fine. The issue is either with your custom patches or maybe the revision in branch 3809 you've used was broken and was fixed later on.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 36 guests