how does vfio handle shared gsi with other device? - qemu

I'm a little confused about how resamplefd handle shared GSI.
assume i have a virtual pci device with gsi 10, and a passthroughed dev, also have gsi 10, now, let's see the problem:
physical device assert an irq, vfio_intx_handler is called, the handler signal the irqfd, then irqfd_inject is called, kvm_set_irq(KVM_IRQFD_RESAMPLE, 10, 1)
somehow, virtual dev in qemu also called pci_irq_assert, this would led to kvm_set_irq(KVM_USERSPACE, 10, 1)
kvm inject this gsi(10) to guest by manipulate VMCS
guest process the interrupt for virtual dev
guest write eoi
resampler_ack is called, which would call kvm_set_irq(KVM_IRQFD_RESAMPLE, 10, 0)
so, are we lost an irq inject from physical dev because it's acked by a virtual dev?

Related

How does qemu-riscv pass the Device Tree Blob to the guest kernel?

How does the default bios (OpenSBI) in qemu-system-riscv pass the Device Tree Blob to a guest?
I can see from the documentation for qemu-system-arm 'virt' platform that QEMU passes the address of the Device Tree Blob (dtb) to guests in r0 when using the Linux Boot Protocol, or at a hard-coded address for bare-metal guest kernels.
The source code in hw/riscv/virt.c within the QEMU repo shows that a Device Tree Blob is generated for the RISC-V 'virt' platform (Via the create_fdt function), however none of the documentation I can find describes how this is passed to the guest. Any help is appreciated.
How does the default bios (OpenSBI) in qemu-system-riscv pass the Device Tree Blob to a guest?
It doesn't. The mechanism is similar to all qemu "virt" machines. It's qemu responsibility to generate and load compiled dtb in this particular case.
Actually you can rely only on RAM and FLASH addresses all other information should be taken from Qemu generated DTB.
Citing from qemu/hw/riscv/boot.c:
riscv_load_fdt
/*
* We should put fdt as far as possible to avoid kernel/initrd overwriting
* its content. But it should be addressable by 32 bit system as well.
* Thus, put it at an 16MB aligned address that less than fdt size from the
* end of dram or 3GB whichever is lesser.
*/
OpenSBI expects the fdt addr passed via "a1", unless you compiled OpenSBI with dtb build-in FW_FDT_PATH, see:
opensbi/docs/firmware/fw.md
opensbi/docs/firmware/fw_payload.md
The address of fdt cannot be set directly (OpenSBI v0.9) currently during compile time.
The address of fdt passed to next mode however can be changed with FW_PAYLOAD_FDT_ADDR.
So FW_FDT_PATH and FW_PAYLOAD_FDT_ADDR affect fdt respectively.
Qemu setups reset vector in riscv_setup_rom_reset_vec and among other things sets fdt_load_addr
What happens next depends on OpenSBI mode (dtb can be reallocated by OpenSBI), but you can look at sbi_hart_switch_mode in opensbi/sbi_hart.c:
register unsigned long a0 asm("a0") = arg0;
register unsigned long a1 asm("a1") = arg1;
__asm__ __volatile__("mret" : : "r"(a0), "r"(a1));
__builtin_unreachable();
Finally see https://www.sifive.com/blog/all-aboard-part-6-booting-a-risc-v-linux-kernel for RISC-V kernel boot proccess:
Early Boot in Linux
When Linux boots, it expects the system to be in the following state:
a0 contains a unique per-hart ID. We currently map these to Linux CPU IDs,
so they're expected to be contiguous and close to 0.
a1 contains a pointer to the device tree, represented as a binary flattened
device tree (DTB).
Update:
For example you can see the following with:
build-qemu/qemu-system-riscv64 -machine virt -m 2G -nographic -bios opensbi/build/platform/generic/firmware/fw_jump.bin
And OpenSBI compiled with FW_OPTIONS=0x2:
Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01 : 0x0000000080000000-0x000000008003ffff ()
Domain0 Region02 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000080200000
Domain0 Next Arg1 : 0x0000000082200000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes

How to read COM ports? navigator.serial.getPorts returns empty list

I have a small number of USB serial interfaces connected (a HF transceiver, CW keyer based on Arduino) and two bluetooth ports, that I never use and am not sure where do they come from (probably some application). In my SPA I need to read list of ports to be able to select which one to connect as which function.
However, when I call navigator.serial.getPorts() I always get an empty list. BTW, same for navigator.usb.getDevices() It runs on Chrome version 87.0.4280.141 (Official Build) (64-bit). Serial API is enabled.
How to solve this?
UPDATE: it is invoked from script in HTML file in local filesystem (not served over HTTP)
You need to request the user's permission to read the Serial's ports by first calling navigator.serial.requestPort():
onclick = async () => {
await navigator.serial.requestPort();
console.log( await navigator.serial.getPorts() );
};
Live example
You have to get permission to access any serial port by Serial.requestPort(). And the requestPort function can be called only with user activation, such as in click event callback.
After you get the permission of many serial ports, you can list the ports that you can access by Serial.getPorts().
getPorts function doesn't mean get the permission to serial ports, but lists the serials ports that you have had permission to access.
Ref: https://developer.mozilla.org/en-US/docs/Web/API/Serial

Google Chrome and Chromium, "Aw, Snap" under all conditions.... how to isolate reason

I have been using Google Chrome on my Slackware unix box for about 6 months now. So I know the program does work on Slackware. But -- I recently had to recompile and upgrade my linux kernel from 3.17.8 to 3.18.9 in order to upgrade the system's ATI R9 290 graphics card behavior for games, and I also did it in hopes of eliminating a google-chrome ERROR start up message which says "ERROR:sandbox_linux.cc(325)] InitializeSandbox() called with multiple threads in process gpu-process" , BUT shortly afterward I started getting the Aw, Snap! blue screen of death and can no longer web browse.
I tried all the obvious repair tricks, deleting the google ~/.cache/... and ~/.config/..., reinstalling chrome (and got & compiled the latest releases google-chrome-41.0.2272.101-x86_64-1, chromium-41.0.2272.101-x86_64-1alien, ), to the extreme attempt in desperation of completely re-installing Slackware linux from scratch on a new hard drive assuming I must have damaged a library or something somewhere and even recompiling the kernel both with and without seccomp trusted byte code, and switching back and forth between mozilla-nss-3.15.2-x86_64-2, and seamonkey-solibs-2.21-x86_64-1 to see if either library set caused a problem...
And just to be safe, I installed all the 32 bit multilib compatability libraries for every 64 bit package I installed, and added the following non-standard libraries to the system which some websites suggested might have been needed in the past for Chrome, even if they aren't anymore...
ORBit2-2.14.19-x86_64-1_SBo
GConf-3.2.6-x86_64-1
pciutils-3.2.0-x86_64-2 # To fix slackware libpci.a not being a dynamic lib.
libgnome-keyring-3.8.0-x86_64-1
gnome-keyring-3.8.2-x86_64-1
freealut-1.1.0-x86_64-1ponce
freeglut-2.8.0-x86_64-1
OpenAL-1.16.0-x86_64-1_SBo
And for fonts, I have true microsoft windows Times, and Arial, and also dejavu-fonts-ttf-2.34-noarch-1, and fslsfonts-1.0.4-x86_64-1, which have always been sufficient in the past, but to be safe I added liberation-fonts-ttf-1.07.2-noarch-1 recently; but it didn't help.
The present ldd of chromium shows the following libraries, all of them being stock for slackware64 14.1 except the ones listed above; As you can see, there are NO missing libraries.
linux-vdso.so.1 (0x00007fff60fda000)
librt.so.1 => /lib64/librt.so.1 (0x00007f8a60296000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f8a60091000)
libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0(0x00007f8a5fe42000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f8a5fb18000)
libnss3.so => /usr/lib64/libnss3.so (0x00007f8a5f7db000)
libsmime3.so => /usr/lib64/libsmime3.so (0x00007f8a5f5ae000)
libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f8a5f383000)
libplc4.so => /usr/lib64/libplc4.so (0x00007f8a5f17e000)
libnspr4.so => /usr/lib64/libnspr4.so (0x00007f8a5ef41000)
libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007f8a5ebe8000)
libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f8a5e9ad000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f8a5e71c000)
libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007f8a5e510000)
libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007f8a5e21b000)
libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007f8a5dfd1000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f8a5dc97000)
libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f8a5da87000)
libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f8a5d87d000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f8a5d66c000)
libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f8a5d466000)
libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f8a5d25d000)
libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007f8a5d05b000)
libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007f8a5cd65000)
libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f8a5cb63000)
libXtst.so.6 => /usr/lib64/libXtst.so.6 (0x00007f8a5c95e000)
libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f8a5c754000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f8a5c52b000)
libcups.so.2 => /usr/lib64/libcups.so.2 (0x00007f8a5c2e0000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8a5c0c2000)
libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007f8a5be7c000)
libgtk-x11-2.0.so.0 => /usr/lib64/libgtk-x11-2.0.so.0 (0x00007f8a5b848000)
libgdk-x11-2.0.so.0 => /usr/lib64/libgdk-x11-2.0.so.0 (0x00007f8a5b595000)
libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0 (0x00007f8a5b375000)
libXss.so.1 => /usr/lib64/libXss.so.1 (0x00007f8a5b172000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f8a5ae6f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f8a5ab6d000)
libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f8a5a957000)
libc.so.6 => /lib64/libc.so.6 (0x00007f8a5a58d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8a679db000)
libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f8a5a385000)
libplds4.so => /usr/lib64/libplds4.so (0x00007f8a5a182000)
libz.so.1 => /lib64/libz.so.1 (0x00007f8a59f6c000)
libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007f8a59d69000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f8a59b4e000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f8a5993e000)
libpng14.so.14 => /usr/lib64/libpng14.so.14 (0x00007f8a59719000)
libpixman-1.so.0 => /usr/lib64/../lib64/libpixman-1.so.0 (0x00007f8a59470000)
libxcb-shm.so.0 => /usr/lib64/../lib64/libxcb-shm.so.0 (0x00007f8a5926e000)
libX11-xcb.so.1 => /usr/lib64/../lib64/libX11-xcb.so.1 (0x00007f8a5906d000)
libxcb-render.so.0 => /usr/lib64/../lib64/libxcb-render.so.0 (0x00007f8a58e63000)
libxcb.so.1 => /usr/lib64/../lib64/libxcb.so.1 (0x00007f8a58c46000)
libXau.so.6 => /usr/lib64/../lib64/libXau.so.6 (0x00007f8a58a43000)
libXdmcp.so.6 => /usr/lib64/../lib64/libXdmcp.so.6 (0x00007f8a5883d000)
libpangoft2-1.0.so.0 => /usr/lib64/../lib64/libpangoft2-1.0.so.0 (0x00007f8a58629000)
libgthread-2.0.so.0 => /usr/lib64/../lib64/libgthread-2.0.so.0 (0x00007f8a58428000)
libharfbuzz.so.0 => /usr/lib64/../lib64/libharfbuzz.so.0 (0x00007f8a58196000)
libicule.so.51 => /usr/lib64/../lib64/libicule.so.51 (0x00007f8a57f40000)
libicuuc.so.51 => /usr/lib64/../lib64/libicuuc.so.51 (0x00007f8a57bd6000)
libicudata.so.51 => /usr/lib64/../lib64/libicudata.so.51 (0x00007f8a5648b000)
libssl.so.1 => /lib64/libssl.so.1 (0x00007f8a56220000)
libcrypto.so.1 => /lib64/libcrypto.so.1 (0x00007f8a55e47000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f8a55c0e000)
libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007f8a55a0b000)
libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007f8a557e8000)
But -- it's all no good. Both chrome and chromium (which I can successfully compile from scratch without any problems), give the same blue screen of death with "Aw, Snap!" at start-up, and neither will even allow the display of the "about chrome page" or anything else. It's is 100% unable to display anything except popup dialogs. Please note: Firefox, several OpenGL games, and even GPU accerated ones like Trine, and all other normal slackware X11 applications work perfectly. There is no firewall, or ad-blocking, or anything installed on this system at the moment. Yet -- the problem persists.
I decided to enable the error reporting feature of chrome to let them know but that merely caused a list of error messages to scroll by in the terminal saying that the certificate of authority of google could not be verified locally... Which made me laugh, and decide to post here -- for Google probably believes there is nothing wrong with their browser under linux -- because they aren't receiveing any error messages... and never will...
So, how can I isolate what is causing the problem? (Or at very least get bug reporting working?!) I'm willing to try on chrome or chromium .
For my last attempt before giving up, on chromium, I tried assuming it was a gpu-related problem, and perhaps a kernel setting messed it up -- so I looked for clues on how to turn off the gpu completely.
I can not tell if these flags are specific to chrome, or if they will work with chrome and chromium both, but here's what I did from the command line:
chromium --disable-accelerated-composting --disable-accelerated-layers --disable-accelerated-2d-canvas --blacklist-webgl --blacklist-accelerated-composting --enable-logging=stderr --v=1 www.yahoo.com 2> ~/chrome_err.log
However, that didn't even get rid of the original error message that made me want to upgrade in the first place, for it still reports ERROR: multiple threads for gpu.
chrome_err.log:
[1725:1725:0324/120300:VERBOSE1:breakpad_linux.cc(1659)] Breakpad disabled
[1:1:0324/120300:VERBOSE1:zygote_main_linux.cc(600)] ZygoteMain: initializing 2 fork delegates
[1:1:0324/120300:VERBOSE1:nacl_fork_delegate_linux.cc(142)] NaClForkDelegate::Init()
[1:1:0324/120300:VERBOSE1:nacl_fork_delegate_linux.cc(142)] NaClForkDelegate::Init()
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "726124521725-usiuc172onlf7t4ind7sf2detm950t7n.apps.googleusercontent.com" for API key GOOGLE_CLIENT_ID_MAIN
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "ll1NK5GBOrAUb6zSbcgAX1Q7" for API key GOOGLE_CLIENT_SECRET_MAIN
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "726124521725-usiuc172onlf7t4ind7sf2detm950t7n.apps.googleusercontent.com" for API key GOOGLE_CLIENT_ID_CLOUD_PRINT
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "ll1NK5GBOrAUb6zSbcgAX1Q7" for API key GOOGLE_CLIENT_SECRET_CLOUD_PRINT
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "726124521725-usiuc172onlf7t4ind7sf2detm950t7n.apps.googleusercontent.com" for API key GOOGLE_CLIENT_ID_REMOTING
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "ll1NK5GBOrAUb6zSbcgAX1Q7" for API key GOOGLE_CLIENT_SECRET_REMOTING
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "726124521725-usiuc172onlf7t4ind7sf2detm950t7n.apps.googleusercontent.com" for API key GOOGLE_CLIENT_ID_REMOTING_HOST
[1725:1748:0324/120300:VERBOSE1:google_api_keys.cc(237)] Using default value "ll1NK5GBOrAUb6zSbcgAX1Q7" for API key GOOGLE_CLIENT_SECRET_REMOTING_HOST
[1725:1725:0324/120300:VERBOSE1:pref_proxy_config_tracker_impl.cc(148)] 0x7fef8a158280: set chrome proxy config service to 0x7fef8a1899f0
[1725:1725:0324/120300:VERBOSE1:pref_proxy_config_tracker_impl.cc(277)] 0x7fef8a158280: Done pushing proxy to UpdateProxyConfig
[1725:1725:0324/120300:VERBOSE1:app_list_syncable_service_factory.cc(55)] AppListSyncableServiceFactory()
[1725:1748:0324/120300:VERBOSE1:multi_log_ct_verifier.cc(76)] Adding CT log: Google 'Pilot' log
[1725:1748:0324/120300:VERBOSE1:multi_log_ct_verifier.cc(76)] Adding CT log: Google 'Aviator' log
[1725:1748:0324/120300:VERBOSE1:multi_log_ct_verifier.cc(76)] Adding CT log: DigiCert Log Server
[1725:1725:0324/120300:VERBOSE1:bluetooth_low_energy_event_router.cc(192)] Initializing BluetoothLowEnergyEventRouter.
[1725:1725:0324/120300:VERBOSE1:bluetooth_low_energy_event_router.cc(195)] Bluetooth not supported on the current platform.
[1725:1725:0324/120300:VERBOSE1:app_list_syncable_service_factory.cc(45)] BuildInstanceFor: Default (0x7fef8a19bde0)
[1725:1725:0324/120300:VERBOSE1:pref_proxy_config_tracker_impl.cc(148)] 0x7fef8a287cb0: set chrome proxy config service to 0x7fef8a288370
[1725:1725:0324/120300:VERBOSE1:pref_proxy_config_tracker_impl.cc(277)] 0x7fef8a287cb0: Done pushing proxy to UpdateProxyConfig
[1725:1725:0324/120300:VERBOSE1:extension_service.cc(1533)] AddComponentExtension Bookmark Manager
[1725:1725:0324/120300:VERBOSE1:extension_service.cc(1533)] AddComponentExtension Cloud Print
[1725:1725:0324/120300:VERBOSE1:extension_service.cc(1533)] AddComponentExtension Web Store
[1725:1725:0324/120300:VERBOSE1:extension_service.cc(1533)] AddComponentExtension Chromium
[1725:1725:0324/120300:VERBOSE1:extension_service.cc(1533)] AddComponentExtension Settings
[1725:1725:0324/120300:VERBOSE1:extension_service.cc(1533)] AddComponentExtension Google Now
[1725:1725:0324/120300:VERBOSE1:extension_service.cc(1533)] AddComponentExtension CryptoTokenExtension
[1725:1725:0324/120300:VERBOSE1:app_list_syncable_service.cc(284)] 0x7fef8a26c8c0: AppListSyncableService: InitializeWithService.
[1725:1725:0324/120300:VERBOSE1:app_list_syncable_service.cc(837)] 0x7fef8a26c8c0: SyncStarted: Flare.
[1725:1725:0324/120300:WARNING:data_reduction_proxy_settings.cc(365)] SPDY proxy OFF at startup
[1725:1725:0324/120300:VERBOSE1:account_reconcilor.cc(70)] AccountReconcilor::AccountReconcilor
[1725:1725:0324/120300:VERBOSE1:account_reconcilor.cc(80)] AccountReconcilor::Initialize
[1725:1725:0324/120300:VERBOSE1:ev_whitelist_component_installer.cc(182)] Registering EV whitelist component.
[1725:1725:0324/120300:VERBOSE1:component_updater_service.cc(267)] CrxUpdateService starting up
[1725:1764:0324/120300:VERBOSE1:ev_whitelist_component_installer.cc(68)] Initial load: reading EV whitelist from file: /home/andrew3/.config/chromium/ev_hashes_whitelist.bin
[1725:1725:0324/120300:VERBOSE1:startup_browser_creator_impl.cc(587)] StartupBrowserCreatorImpl::ProcessStartupURLs
[1725:1751:0324/120300:VERBOSE1:ev_whitelist_component_installer.cc(147)] Verifying install: /home/andrew3/.config/chromium/EVWhitelist/6/_platform_specific/all/ev_hashes_whitelist.bin
[1725:1725:0324/120300:VERBOSE1:startup_browser_creator_impl.cc(595)] Pref: default
[1725:1764:0324/120300:VERBOSE1:packed_ct_ev_whitelist.cc(62)] Uncompressing EV whitelist of size 1113849
[1725:1751:0324/120300:VERBOSE1:ev_whitelist_component_installer.cc(159)] Whitelist size: 1113849
[1725:1744:0324/120300:VERBOSE1:crl_set_fetcher.cc(103)] Loaded 201209 bytes of CRL set from disk
[1725:1748:0324/120300:VERBOSE1:crl_set_fetcher.cc(125)] Installed CRL set #2146
[1725:1725:0324/120300:VERBOSE1:password_store_factory.cc(207)] Password storage detected desktop environment: (unknown)
[1725:1725:0324/120300:WARNING:password_store_factory.cc(237)] Using basic (unencrypted) store for password storage. See http://code.google.com/p/chromium/wiki/LinuxPasswordStorage for more information about password storage options.
[7:7:0324/120300:VERBOSE1:sandbox_linux.cc(64)] Activated seccomp-bpf sandbox for process type: renderer.
[7:7:0324/120300:VERBOSE1:child_thread.cc(245)] Mojo is disabled on child
[1725:1725:0324/120300:VERBOSE1:component_updater_service.cc(267)] CrxUpdateService starting up
[1725:1725:0324/120300:VERBOSE1:component_updater_service.cc(274)] First update attempt will take place in 360 seconds
[1725:1725:0324/120300:VERBOSE1:ev_whitelist_component_installer.cc(134)] Component ready, version 6 in /home/andrew3/.config/chromium/EVWhitelist/6
[1725:1742:0324/120300:VERBOSE1:ev_whitelist_component_installer.cc(36)] Reading new EV whitelist from file: /home/andrew3/.config/chromium/EVWhitelist/6/_platform_specific/all/ev_hashes_whitelist.bin
[1725:1764:0324/120300:VERBOSE1:ev_whitelist_component_installer.cc(88)] EV whitelist: Sucessfully loaded initial data.
[1725:1748:0324/120300:VERBOSE1:packed_ct_ev_whitelist.cc(26)] Setting new EV Certs whitelist.
[1725:1742:0324/120300:VERBOSE1:packed_ct_ev_whitelist.cc(62)] Uncompressing EV whitelist of size 1113849
[1725:1748:0324/120300:VERBOSE1:packed_ct_ev_whitelist.cc(26)] Setting new EV Certs whitelist.
[1754:1754:0324/120300:ERROR:sandbox_linux.cc(325)] InitializeSandbox() called with multiple threads in process gpu-process
[1754:1754:0324/120300:VERBOSE1:child_thread.cc(245)] Mojo is disabled on child
[12:12:0324/120300:VERBOSE1:sandbox_linux.cc(64)] Activated seccomp-bpf sandbox for process type: utility.
[12:12:0324/120300:VERBOSE1:child_thread.cc(245)] Mojo is disabled on child
[1725:1725:0324/120302:VERBOSE1:account_reconcilor.cc(98)] AccountReconcilor::Shutdown
[1725:1725:0324/120302:VERBOSE1:merge_session_helper.cc(212)] MergeSessionHelper::CancelAll
[1725:1725:0324/120302:VERBOSE1:account_reconcilor.cc(74)] AccountReconcilor::~AccountReconcilor
[1725:1725:0324/120302:VERBOSE1:ipc_sync_channel.cc(386)] Canceling pending sends
[1725:1725:0324/120302:VERBOSE1:component_updater_service.cc(286)] CrxUpdateService stopping
[1725:1727:0324/120302:VERBOSE1:sandbox_ipc_linux.cc(122)] SandboxIPCHandler stopping.
.... [Edit: Note -- I'm appending what happens when I manually type in a web page name, below]
[12:12:0324/121659:VERBOSE1:sandbox_linux.cc(64)] Activated seccomp-bpf sandbox for process type: utility.
[12:12:0324/121659:VERBOSE1:child_thread.cc(245)] Mojo is disabled on child
[14:14:0324/121702:VERBOSE1:sandbox_linux.cc(64)] Activated seccomp-bpf sandbox for process type: renderer.
[14:14:0324/121702:VERBOSE1:child_thread.cc(245)] Mojo is disabled on child
[1839:1862:0324/121702:VERBOSE1:resource_loader.cc(241)] OnReceivedRedirect: http://www.yahoo.com/
[1868:1915:0324/121702:VERBOSE1:ipc_sync_channel.cc(386)] Canceling pending sends
[1868:1868:0324/121702:VERBOSE1:ipc_sync_channel.cc(386)] Canceling pending sends
[1868:1915:0324/121702:VERBOSE1:ipc_sync_channel.cc(386)] Canceling pending sends
[1839:1839:0324/121705:VERBOSE1:account_reconcilor.cc(98)] AccountReconcilor::Shutdown
[1839:1839:0324/121705:VERBOSE1:merge_session_helper.cc(212)] MergeSessionHelper::CancelAll
[1839:1839:0324/121705:VERBOSE1:account_reconcilor.cc(74)] AccountReconcilor::~AccountReconcilor
[1839:1839:0324/121705:VERBOSE1:ipc_sync_channel.cc(386)] Canceling pending sends
[1839:1839:0324/121705:VERBOSE1:component_updater_service.cc(286)] CrxUpdateService stopping
****Edit: Note ... histograms would normally follow, but I truncated it.
So, anyone have an idea of how to figure out and repair the problem ?
I've never had bluetooth, so I don't think installing those libs will help.
But I am stumped and frustrated, there's no obvious error message clue as to what might be causing the problem, just some esoteric mention of "mojo" diabling without indication of whether that's even good or bad, and the fact that just about everything is shutting down and cancelling everything.... for no reason...
I solved the problem.
Running DMESG, I found a warning that an instruction exception had happened from Google Chrome. That's how I was able to figure out that the kernel processor configuration had somehow changed the memory management algorithms during my recompile.
I am using kernel 3.18.25, and I think it was specifically the "Processor Type and features -> Transparent Hugepage Suport" that caused the problem. Hugepage support must be set to "madvise" rather than to "always" in order for Chrome to work. I suspect the reason Chrome fails, is that the kernel call fails even though the memory is allocated when it is set to always. Some other people on the web reported a similar issue in obscure Google forums lists, so I'm just confirming that it is the most likely culprit.
Just in case that is not the only option which caused Google Chrome to fail, here are the kernel options which I tinkered with between the time I discovered the AW snap problem, and when the problem was solved.
I am listing only the options that I turned on, or changed the value of in that period of time. The rest of the unlisted options that deal with memory management, are all "off".
Processor Types and Features -> Linux guest support: (enable)
Enable paravirtualization, Paravirtualization layer for spinlocks, Xen guest support, Support for running as PVH guest, KVM Guest support, Paravirtualization steal time accounting.
Processor Types and Features -> Support Intel Processors, Support AMD processor
Processor Types and Features:
Enable 1GB pages for kernel pagetables.
Numa Memory allocation and Scheduler support:
ACPI NUMA detection (only),
6 (Maximum Numa nodes as a power of 2),
Sparse Memory virtual memmap,
Enable to assign a node which has only movable memory,
enable for balloon memory compaction,
page migration,
Enable KSM for page merging,
(4096) Low address space protect from user allocation,
Transparent Hugepage support (madvise),
Continuguous memory allocator,
(7) maximum count of the CMA areas,
MTRR support, cleanup support,
MTRR cleanup enable value (1),
MTRR cleanup spare reg num (1),
Enable seccompt to safely compute untrusted byte code.
Try to start it as chromium --no-sandbox - worked for me (but then I guess my kernel somewhat misconfigured)

wakeLock does not wait for network connectivity

I am using a wakelock for a alarm to update the app state regularly. The wifi takes a while to connect on Samsung phones. Also the "keep awake" option on Wifi does not work on Samsung phones (nor are they interested in fixing the issue). So when the wakelock does happen, it should wait for wifi to connect. Do I need to create a listener for the wifi connectivity for this to work, or should wakelock, kinda block for that wifi to connect ?
mWakeLock = ((PowerManager) getSystemService(POWER_SERVICE)).newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, "Taxeeta");
mWakeLock.acquire();
// do some network activity, in a asynctask
// in the doPost of asyscTask, release lock
Edit :
The question is, that in the AsyncTask if the network is not connected, OR takes time to get on (3g takes a while to get on), the webservice call in the Async doInBackground will fail. And I will have to release the lock anyways.
SO
Should I put in wifi/data connection listeners in ? Or is there a better way ?
I have a similar scenario - I am woken up by an alarm, the alarm's BroadcastReceiver launches a WakefulIntentService and the service starts a scan for networks. I use a stupid way of holding on to the lock1 - I intend to replace this with a latch. I suggest you replace the "AsyncTask" with a WakefulIntentService. Chances are the AsyncTask is not ever fired. In the WakefulIntentService you must acquire and hold on to a wifi lock - I would make this a static field of the YourWakefulIntentService - not entirely clear on this - it's a while back. If this does not work I would use a latch in the YourWakefulIntentService :
// register an alarm
Intent i = new Intent(context, YourReceiver.class);
PendingIntent alarmPendingIntent= PendingIntent.getBroadcast(context, 0, i,
PendingIntent.FLAG_UPDATE_CURRENT);
public class YourReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
WakefulIntentService.sendWakefulWork(context, YourWIS.class);
}
}
//pseudocode !
public class YourWIS extends WakefulIntentService { // you must add a cstor !
#Override
doWakefulWork() {
acquireWifiLock();
enableScanReceiver();
startScan();
serviceLatch.wait();
releaseWifiLock();
}
}
// in YourScanReceiver
onReceive() {
if(action.equals(SCAN_RESULTS) {
// do something that does not take time or start another/the same
// WakefulIntentService
serviceLatch.notify();
}
}
Try first the WakefulIntentService (I guess you launch the AsyncTask from the alarm receiver). The scan receiver is a receiver registered to receive the scan results (see WifiManager docs - prefer Receivers to listeners for sleep issues)
1 : this is a working class - I just use a second wakeful intent service to keep the wake locks - have still to refactor it to use latches but this approach at least works (I have the second service (the Gatekeeper) wait on a monitor and have the wake lock inside the Gatekeeper. The gatekeeper also holds its CPU lock so all is fine (and ugly)

Generate Windows Phone 8 Crash Dumps

Does anyone know of a way that I can configure a Windows Phone 8 to generate Crash Dumps for applications that are being developed?
I know that we can get access to dumps that are sent to the MS app store, but I need a dump of an application that is still in development.
Thanks
In "App.xaml.cs" class you will find a method called "Application_UnhandledException". This method is launched every time that your app crashes due an unhandled exception. In the event args you will find the error message, stack trace, etc...
Add your logic here to dump the crash (for example, send an email, or store the log in a database, etc...)
BTW, if the exception is recoverable, you can handle the error and don't close the app setting the Handled variable to true:
// Recover from the error
e.Handled = true;