leaningtech / webvm

Virtual Machine for the Web

Home Page:https://webvm.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command for Clang hangs while command for GCC returns immediately

michael-mayes opened this issue · comments

A command "gcc --version" is known and actioned

A command "clang --version" (or just "clang") hangs seemingly forever

A dummy command "bob" is correctly not recognised and reported on immediately, which does suggest that the command for Clang is recognised
image

Thanks for trying / reporting this.

My guess is that gcc is basically a way 'simpler' program, see:

user@:~$ ls -la /lib/llvm-7/bin/clang
-rwxr-xr-x 0 user user 29615540 Sep 18  2020 /lib/llvm-7/bin/clang
user@:~$ ls -la /bin/i686-linux-gnu-gcc-8
-rwxr-xr-x 0 user user 1093800 Apr  6  2019 /bin/i686-linux-gnu-gcc-8

(note only the relevant part of a program are loaded & executed, but just as a proxy it seems to be significant more complex)
@sere worked on having the (unmodified!) gcc & clang working, she might have further insights.

I have it working after waiting a few seconds, can you please try again waiting a bit longer (say 30 seconds) ?

Only other problem I could think of is that you hit memory limits on your device, but that should only hold for mobile devices.

Hi Carlo. Thanks for the very quick response

I have it working after waiting a few seconds, can you please try again waiting a bit longer (say 30 seconds) ?

Yep, had already left it running last night for a few minutes and have tried again just now

You hit memory limits on your device

I can see that running the command seems to take up about 0.2 GB, but I still have another 1.4 GB available

Should only hold for mobile devices

I am on a Chromebook if that should prove of any relevance:

Google Chrome: Version 98.0.4758.91 (Official Build)  (64-bit)
Platform: 14388.52.0 (Official Build) stable-channel eve
Channel: stable-channel
Firmware Version: Google_Eve.9584.230.0
ARC enabled: true
ARC: 8140288
Enterprise enrolled: false
Developer mode: false

Another bit of useful information could be if you can try again with the DevTools open. This will slow down the process a lot, but there you will find more logging, there is anything like "Fault addr X" being logged?

Thanks for the feedback!

Sorry for the slow turnaround

I tried it in Google Chrome on my Microsoft Windows PC and it is still a lot slower than GCC, but does get there - something like 2 seconds vs 30 seconds

As to my Chromebook, I have tried again, this time with the console visible in Developer Tools and I see the following after a second or two:
Fault addr f0774ee, ip ae776fff, tid 4
Fault from Inode 25233

@michael-mayes Apologies for the delay, we have recently deployed a much improved build of WebVM. It includes significant improvements to memory consumption as well as numerous bug fixes.

Can you try to reproduce again?

Hi @alexp-sssup, absolutely no apologies necessary!

On my Chromebook the new improved version seems to have not assisted with this particular case

In the Console under Developer Tools I am still seeing an identical looking fault for Clang:
TODO: CONSOLE IOCTL 5410
cxcore.js:1 TODO: CONSOLE IOCTL 5410
cxcore.js:1 Fault addr f0774ee, ip ae776fff, tid 4
cxcore.js:1 Fault from Inode 25233

FWIW, for GCC I see the following in the Console under Developer Tools:
TODO: CONSOLE IOCTL 5410
cxcore.js:1 TODO: CONSOLE IOCTL 5410
cxcore.js:1 TODO: CONSOLE IOCTL 5414

Does the issue still happen with current version?

No, seems to be resolved now! 👍

image

Also the segfault has gone
image

Closing this issue on the basis that the original observation is now addressed

Great work 👏