Core dump building phoenix from source on RPi3

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Core dump building phoenix from source on RPi3

Daniel McBrearty
Hello all,

I am trying to build from source on a Raspberry Pi 3. I am following these instructions:

https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

I am using virtualenv, it is active and uses the builtin python 3.4.2

I get a core dump after about 20 minutes of compilation. This happens on two different boards (both fresh installs of standard debian distro).

I did run apt-get update before install. SD Card space is not an issue (44% full).

Output attached.

(PS apologies for double post - previous one has some info about overheating, but I don't think that is relevant. I couldn't find it to delete it.)

Daniel


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

op.txt (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

Daniel McBrearty
I am still trying to figure out the issue. (The output above doesn't show the seg fault - see attachments to this post.)

I saw that each individual compile statement runs fine if I copy paste to command line, but dumps when executed through the build script. (The output files are visible in the build directory after running the cc command.)

I wondered if this might be memory problems due to running 4 jobs in parallel, so I tried adding --jobs=1 - same result. See files attached. Any ideas as to what this could be about? I am really stumped for what to try next. Thanks.






On Wednesday, 6 December 2017 19:41:52 UTC+1, Daniel McBrearty wrote:
Hello all,

I am trying to build from source on a Raspberry Pi 3. I am following these instructions:

<a href="https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;">https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

I am using virtualenv, it is active and uses the builtin python 3.4.2

I get a core dump after about 20 minutes of compilation. This happens on two different boards (both fresh installs of standard debian distro).

I did run apt-get update before install. SD Card space is not an issue (44% full).

Output attached.

(PS apologies for double post - previous one has some info about overheating, but I don't think that is relevant. I couldn't find it to delete it.)

Daniel


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

OK_with_cc.txt (2K) Download Attachment
seg_fault_with_build_py.txt (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

Daniel McBrearty
In reply to this post by Daniel McBrearty
I am making some progress with this, but it is a bizarre struggle.

First there seem to be some misleading parts in the link I posted above (this one ; https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi )

These two statements :

    $ pip3 install -r requirements.txt
    $ cd wxPython-4.0.0b2


These need to be executed in reverse order. But in fact it seems better to just cat the contents of requirements.txt and install individually. For some odd reason when I tried to use pip to install in a batch, the command hung (in fact the whole RPi became very unresponsive).

With this done the compilation is not too bad. It takes maybe 2-3 hours on an RPi3.

then the last step is to pip install the package - but what does pip do but then try to install the prerequisites AGAIN (and AGAIN the system hangs).

Doesn't pip have some make-like behaviour that stops it from doing work over and over that doesn't need to be done? And why the system hangs and core dumps?

I have to say, between core dumps and bad packaging tools - I am a bit unconvinced by this at the moment. but if anyone can explain to me what kind of basic error I am making - I am all ears.

thanks

Daniel









On Wednesday, 6 December 2017 19:41:52 UTC+1, Daniel McBrearty wrote:
Hello all,

I am trying to build from source on a Raspberry Pi 3. I am following these instructions:

<a href="https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;">https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

I am using virtualenv, it is active and uses the builtin python 3.4.2

I get a core dump after about 20 minutes of compilation. This happens on two different boards (both fresh installs of standard debian distro).

I did run apt-get update before install. SD Card space is not an issue (44% full).

Output attached.

(PS apologies for double post - previous one has some info about overheating, but I don't think that is relevant. I couldn't find it to delete it.)

Daniel


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

Daniel McBrearty
In reply to this post by Daniel McBrearty
OK, for the benefit of anyone that comes this way in future, this is what I found:

1. the core dumping seems to be a result of not having installed the dependencies in the wxPython requirements.txt
2. I had to install these one by one manually. Doing "pip install -r requirements.txt" completely hung the RPi (in the end, after more than an hour with the GUI almost totally unresponsive, I cycled the power and ran fsck - this on two different boards).
3. With the packages in requirements.txt properly installed - you can build with "python build.py build" - this is not so bad, takes maybe 2 hours on an RPi3.
4. The last step "pip install /path/to/wxPython_build_dir"  kicks off another round of compilation which also takes a while.

With this done - installation seems to have succeeded. Except that when I do 

import wx

at a python prompt - it complains about line 17 in __init.py__ - says that module wx.core does not exist ... so all is still not well. But a step closer ...

Daniel





On Wednesday, 6 December 2017 19:41:52 UTC+1, Daniel McBrearty wrote:
Hello all,

I am trying to build from source on a Raspberry Pi 3. I am following these instructions:

<a href="https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;">https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

I am using virtualenv, it is active and uses the builtin python 3.4.2

I get a core dump after about 20 minutes of compilation. This happens on two different boards (both fresh installs of standard debian distro).

I did run apt-get update before install. SD Card space is not an issue (44% full).

Output attached.

(PS apologies for double post - previous one has some info about overheating, but I don't think that is relevant. I couldn't find it to delete it.)

Daniel


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

Daniel McBrearty
In reply to this post by Daniel McBrearty
OK - I have it working. The last (wx.core not found) issue seems to have been caused by doing a "build.py clean" at some point - this obviously does a bit more than you might expect!

With a fresh start from source everything worked out OK.

I hope this helps someone in future ...

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

Daniel McBrearty
In reply to this post by Daniel McBrearty
well, there turns out to be another twist. I wasn't dreaming about compilation errors, etc ...

I had my build working on a NOOBS sdCard, then went to clone it and had loads of problems with cards that would not boot. Tried with the win32diskimager and also from my linux laptop with dd. Then decided to make a non-NOOBS card and rebuild on that - using the exact same methodology I started getting compile errors once again.

Now I am suspecting the sdCards. They are the ones that came with the RPi (brand is Integrak) and I suspect that they are not handling the compilation process and are already shot. Now I await a couple of industrial rated Panasonic ones, lets see if that helps. All sdCards are not created equal, it seems ...

of course I am not sure yet - this is just for the benefit of anyone else who sees this type of pernicious, non-repeatable behaviour and wonders what the **** is happening ... ;-)

Daniel




On Wednesday, 6 December 2017 19:41:52 UTC+1, Daniel McBrearty wrote:
Hello all,

I am trying to build from source on a Raspberry Pi 3. I am following these instructions:

<a href="https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;">https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

I am using virtualenv, it is active and uses the builtin python 3.4.2

I get a core dump after about 20 minutes of compilation. This happens on two different boards (both fresh installs of standard debian distro).

I did run apt-get update before install. SD Card space is not an issue (44% full).

Output attached.

(PS apologies for double post - previous one has some info about overheating, but I don't think that is relevant. I couldn't find it to delete it.)

Daniel


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

GadgetSteve
Hi Daniel,

 From a theoretical perspective when building on slow mediums such as SD
cards it is a very good idea to build in a single thread, (i.e. j=1), as
sometimes you can get cache misses, e.g. job 1 compiles and writes
fred.o and job 2 is waiting for this so as soon as job 1 signals
finished tries to use it but it is still not actually been written so
crash. This sounds like the sort of behaviour that you are getting.

On slow to write SD cards, (and any other slow media), the build process
will be IO bound rather than processor bound so setting the number of
jobs to 1 will not extend the build process by much.

Got to be worth a try as it will still probably be quicker than the
snail mail.

Hope that is a help.

Steve

On 11/12/2017 07:04, Daniel McBrearty wrote:

> well, there turns out to be another twist. I wasn't dreaming about
> compilation errors, etc ...
>
> I had my build working on a NOOBS sdCard, then went to clone it and had
> loads of problems with cards that would not boot. Tried with the
> win32diskimager and also from my linux laptop with dd. Then decided to
> make a non-NOOBS card and rebuild on that - using the exact same
> methodology I started getting compile errors once again.
>
> Now I am suspecting the sdCards. They are the ones that came with the
> RPi (brand is Integrak) and I suspect that they are not handling the
> compilation process and are already shot. Now I await a couple of
> industrial rated Panasonic ones, lets see if that helps. All sdCards are
> not created equal, it seems ...
>
> of course I am not sure yet - this is just for the benefit of anyone
> else who sees this type of pernicious, non-repeatable behaviour and
> wonders what the **** is happening ... ;-)
>
> Daniel
>
>
>
>
> On Wednesday, 6 December 2017 19:41:52 UTC+1, Daniel McBrearty wrote:
>
>     Hello all,
>
>     I am trying to build from source on a Raspberry Pi 3. I am following
>     these instructions:
>
>     https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi
>     <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi&data=02%7C01%7C%7C33fc3b48be034e93cbda08d540657cc8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636485726978273205&sdata=S%2Fa5Yzwn%2BjdFlJLNRclKzV0E1W%2B5sdGnwsl5Q0DpE50%3D&reserved=0>
>
>     I am using virtualenv, it is active and uses the builtin python 3.4.2
>
>     I get a core dump after about 20 minutes of compilation. This
>     happens on two different boards (both fresh installs of standard
>     debian distro).
>
>     I did run apt-get update before install. SD Card space is not an
>     issue (44% full).
>
>     Output attached.
>
>     (PS apologies for double post - previous one has some info about
>     overheating, but I don't think that is relevant. I couldn't find it
>     to delete it.)
>
>     Daniel
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7C33fc3b48be034e93cbda08d540657cc8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636485726978273205&sdata=OJyeTln5KCq9fj6ORDDG1uGdrlY2waNJImP80vkKZ7U%3D&reserved=0>.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

---
This email has been checked for viruses by AVG.
http://www.avg.com

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

Daniel McBrearty
In reply to this post by Daniel McBrearty
Hello Steve,

Thanks for that. I tried it, the same thing.

This is really bizarre and I don't get it. When I run the failing compile command by itself (by copying and pasting from the build output, on the  command line), it is fine. It leaves the object file in the build directory.

But when I run it with the build script - seg fault. This is 100% repeatable.

If I knew how to go about trying to find the cause of the seg fault,  I would. If anyone can tell me how to do that - please do.

It's a good idea to use better sdCards anyway, but I am wondering if that is the issue. If the command works on command line but not with build script - doesn't that suggest a build script issue?

I might try a clean new env (I'll leave this one here for diag purposes) and try building the whole job with j=1.

Output is attached.


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

err.txt (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

Daniel McBrearty
In reply to this post by Daniel McBrearty
This is really getting stupid.

So - *another* build - this time went right through the compiliation step (6 hours) in single thread mode - but we got there, no errors.

Then the final "pip install" step - and that crashed the RPi. Now it is sat on my desk, the green light (I think that means "writing to sdCard"?)  is permanently on. Quite possibly it has trashed the card.

I also had (luckily) a putty session with top running - which is also  frozen. But I can at least take a screenshot (attached) which shows what was running when the thing died.

Again, pip was trying to run 4 cc compilers (why is heavy compilation happening on the "install" step *anyway*?) 

So ... back ... again to step 1 ...




On Wednesday, 6 December 2017 19:41:52 UTC+1, Daniel McBrearty wrote:
Hello all,

I am trying to build from source on a Raspberry Pi 3. I am following these instructions:

<a href="https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNELviXJwvs1Blq_VGaMxCa89S6NGQ&#39;;return true;">https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

I am using virtualenv, it is active and uses the builtin python 3.4.2

I get a core dump after about 20 minutes of compilation. This happens on two different boards (both fresh installs of standard debian distro).

I did run apt-get update before install. SD Card space is not an issue (44% full).

Output attached.

(PS apologies for double post - previous one has some info about overheating, but I don't think that is relevant. I couldn't find it to delete it.)

Daniel


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

crash.jpg (123K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Core dump building phoenix from source on RPi3

GadgetSteve
Daniel,

Can I suggest trying running the build up to but not including the pip
install step and then, assuming success so far, shutting down (I would
give it 5 minutes or so to finish writing first), removing the SD card
and making an image of the SD card as it is at the time. As per
https://lifehacker.com/how-to-clone-your-raspberry-pi-sd-card-for-super-easy-r-1261113524 
- (that article also mentions SD card issues due to a poor power supply).

You can then resume at that stage at any time by restoring the image
onto the SD card.

You can also try adding --install-option="--skip-build" to the pip
install command - I am guessing that since you have just finished a
build you don't need on again. If that doesn't do the trick then you can
try: --install-option="-j=1" which should, if I am reading the code
correctly, have the same impact during the pip install as -j=1 did
during the build.

(I would also add --upgrade-strategy="only-if-needed" to stop pip
getting over keen)

I notice that the requirements.txt file specified numpy so make sure
that it is installed into any virtual environment that you are doing the
build & install in.

Hope that helps.

Steve

On 11/12/2017 16:30, Daniel McBrearty wrote:

> This is really getting stupid.
>
> So - *another* build - this time went right through the compiliation
> step (6 hours) in single thread mode - but we got there, no errors.
>
> Then the final "pip install" step - and that crashed the RPi. Now it is
> sat on my desk, the green light (I think that means "writing to
> sdCard"?)  is permanently on. Quite possibly it has trashed the card.
>
> I also had (luckily) a putty session with top running - which is also  
> frozen. But I can at least take a screenshot (attached) which shows what
> was running when the thing died.
>
> Again, pip was trying to run 4 cc compilers (why is heavy compilation
> happening on the "install" step *anyway*?)
>
> So ... back ... again to step 1 ...
>
>
>
>
> On Wednesday, 6 December 2017 19:41:52 UTC+1, Daniel McBrearty wrote:
>
>     Hello all,
>
>     I am trying to build from source on a Raspberry Pi 3. I am following
>     these instructions:
>
>     https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi
>     <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.wxpython.org%2FBuildWxPythonOnRaspberryPi&data=02%7C01%7C%7Cf9a6e152dd45495e5eb008d540b48c6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636486066548184397&sdata=X%2FdkLnzqerksUi%2BGrNeJ6VAqyq6K%2BLwcTBFAPCedT54%3D&reserved=0>
>
>     I am using virtualenv, it is active and uses the builtin python 3.4.2
>
>     I get a core dump after about 20 minutes of compilation. This
>     happens on two different boards (both fresh installs of standard
>     debian distro).
>
>     I did run apt-get update before install. SD Card space is not an
>     issue (44% full).
>
>     Output attached.
>
>     (PS apologies for double post - previous one has some info about
>     overheating, but I don't think that is relevant. I couldn't find it
>     to delete it.)
>
>     Daniel
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cf9a6e152dd45495e5eb008d540b48c6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636486066548184397&sdata=6Lg2PRqgqhQ3eypg%2BEXePJdCQXOfpOsmTuoMzbsOzsA%3D&reserved=0>.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

---
This email has been checked for viruses by AVG.
http://www.avg.com

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.