A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20150130/ba3a8067/attachment-0001.html below:

<div dir="ltr">No...<div><br></div><div>...but I think I found the issue with grep. Try applying the attached patch to the Python/frozenmain.c. It comments out the locale handling.<br></div><div><br></div><div>It seems that Python always calls its strdup function on the locale string. On Android, this can apparently be null (as seen in the bug report you linked to).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 30, 2015 at 12:00 PM, Cyd Haselton <span dir="ltr"><<a href="mailto:chaselton@gmail.com" target="_blank">chaselton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't have gdb on device; does the following tell you where Python's<br>
strdup is called?<br>
<br>
>> _PyMem_RawStrdup<br>
>> /bld/python/Python-3.4.2/Objects/obmalloc.c:323<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Jan 30, 2015 at 11:52 AM, Ryan Gonzalez <<a href="mailto:rymg19@gmail.com">rymg19@gmail.com</a>> wrote:<br>
> Is it possible at all to get a stack trace of the crash using gdb? Try the<br>
> steps here.<br>
><br>
> That way we can see where Python's own strdup function is getting called.<br>
><br>
> On Fri, Jan 30, 2015 at 9:05 AM, Cyd Haselton <<a href="mailto:chaselton@gmail.com">chaselton@gmail.com</a>> wrote:<br>
>><br>
>> Absolutely.  Good thing I have addr2line on device<br>
>><br>
>> /bld/python/Python-3.4.2 $ addr2line -C -f -e /lib/libpython3.4m.so.1.0<br>
>> 0008bbc8<br>
>> _PyMem_RawStrdup<br>
>> /bld/python/Python-3.4.2/Objects/obmalloc.c:323<br>
>> /bld/python/Python-3.4.2 $<br>
>><br>
>><br>
>><br>
>> On Thu, Jan 29, 2015 at 8:26 PM, Ryan <<a href="mailto:rymg19@gmail.com">rymg19@gmail.com</a>> wrote:<br>
>> > Could you try the steps at <a href="http://stackoverflow.com/a/11369475/2097780" target="_blank">http://stackoverflow.com/a/11369475/2097780</a>?<br>
>> > They<br>
>> > allow you to get a better idea of where libc is crashing.<br>
>> ><br>
>> > Cyd Haselton <<a href="mailto:chaselton@gmail.com">chaselton@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Managed to get this out of logcat:<br>
>> >> F(11914) Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread<br>
>> >> 11914 (python)  (libc)<br>
>> >><br>
>> >> [ 01-29 19:30:55.855 23373:23373 F/libc  Â  Â ]<br>
>> >> Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 23373 (python)<br>
>> >><br>
>> >> Less detail than strace but it seems to be that python is segfaulting<br>
>> >> libc...<br>
>> >><br>
>> >> On Wed, Jan 28, 2015 at 11:23 AM, Ryan Gonzalez <<a href="mailto:rymg19@gmail.com">rymg19@gmail.com</a>><br>
>> >> wrote:<br>
>> >>><br>
>> >>>  On Wed, Jan 28, 2015 at 10:43 AM, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>><br>
>> >>> wrote:<br>
>> >>>><br>
>> >>>><br>
>> >>>>  What I see in the strace:<br>
>> >>>><br>
>> >>>>  ... load libpython3.4m.so.1.0<br>
>> >>>>  ... load libm<br>
>> >>>>  ... open /dev/__properties__ and do something to it<br>
>> >>>> (what?)<br>
>> >>>>  ... get current time<br>
>> >>>>  ... allocate memory<br>
>> >>>>  ... getuid<br>
>> >>>>  ... segfault<br>
>> >>>><br>
>> >>>>  That's not a lot to go on, but it doesn't look as if it has started<br>
>> >>>> to<br>
>> >>>>  load modules yet.<br>
>> >>>><br>
>> >>>>  Does /dev/__properties__ ring a bell? Not to me.<br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>> <a href="https://android.googlesource.com/platform/system/core/+/tools_r22/init/property_service.c" target="_blank">https://android.googlesource.com/platform/system/core/+/tools_r22/init/property_service.c</a><br>
>> >>>  is the code that works with that file.<br>
>> >>><br>
>> >>>  This explains it a bit (slides 24-29). Looks like something to do<br>
>> >>> with<br>
>> >>>  interprocess communication. Likely has nothing to do with Python<br>
>> >>> itself.<br>
>> >>><br>
>> >>>  Maybe this would be useful?<br>
>> >>><br>
>> >>>><br>
>> >>>>  That stack trace would be really helpful.<br>
>> >>>><br>
>> >>>>  On Wed, Jan 28, 2015 at 8:34 AM, Cyd Haselton <<a href="mailto:chaselton@gmail.com">chaselton@gmail.com</a>><br>
>> >>>> wrote:<br>
>> >>>>><br>
>> >>>>><br>
>> >>>>>  Apologies...I'm not sure what a stack track is, but I do have the<br>
>> >>>>>  strace.  Nearest I can tell, it happens due to an open call, though<br>
>> >>>>> I<br>
>> >>>>>  am probably wrong.<br>
>> >>>>>  Attaching the strace output to this email.  I'm going to head back<br>
>> >>>>> to<br>
>> >>>>>  the documentation and to back out of some Android-related changes<br>
>> >>>>> in<br>
>> >>>>>  _localemodule.c<br>
>> >>>>><br>
>> >>>>>  On Wed, Jan 28, 2015 at 9:43 AM, Guido van Rossum<br>
>> >>>>> <<a href="mailto:guido@python.org">guido@python.org</a>><br>
>> >>>>>  wrote:<br>
>> >>>>>><br>
>> >>>>>>  There could be a million differences relevant (unicode, ints,<br>
>> >>>>>> ...).<br>
>> >>>>>>  Perhaps<br>
>> >>>>>>  the importlib bootstrap is failing. Perhaps the dynamic loading<br>
>> >>>>>> code<br>
>> >>>>>>  changed. Did you get a stack track? (IIRC strace shows a syscall<br>
>> >>>>>> trace<br>
>> >>>>>>  --<br>
>> >>>>>>  also useful, but doesn't tell you precisely how<br>
>> >>>>>> it segfaulted.)<br>
>> >>>>>><br>
>> >>>>>>  On Wed, Jan 28, 2015 at 6:43 AM, Cyd Haselton<br>
>> >>>>>> <<a href="mailto:chaselton@gmail.com">chaselton@gmail.com</a>><br>
>> >>>>>>  wrote:<br>
>> >>>>>>><br>
>> >>>>>>><br>
>> >>>>>>>  All,<br>
>> >>>>>>>  I recently ditched my attempts to port Python 2.7.8 to Android in<br>
>> >>>>>>>  favor of Python 3.4.2.  Unfortunately, after using the same<br>
>> >>>>>>> configure<br>
>> >>>>>>>  options in the same environment, and modifying the setup.py as<br>
>> >>>>>>> needed,<br>
>> >>>>>>>  the newly built binary throws a segfault when the<br>
>> >>>>>>> generate-posix-vars<br>
>> >>>>>>>  portion of the build is reached...and when it is run as well<br>
>> >>>>>>> (i.e.<br>
>> >>>>>>>  ./python --help, ./python -E -S -m sysconfig, or similar)<br>
>> >>>>>>><br>
>> >>>>>>>  I took a strace of ./python, however I'm a bit lost when<br>
>> >>>>>>> reviewing<br>
>> >>>>>>> it.<br>
>> >>>>>>>  Any ideas as to what may be going on...i.e. why Python 2.7 works<br>
>> >>>>>>> but<br>
>> >>>>>>>  3.x throws a segfault?<br>
>> >>>>>>><br>
>> >>>>>>>  Thanks in advance,<br>
>> >>>>>>>  Cyd<br>
>> >>>>>>> ________________________________<br>
>> >>>>>>><br>
>> >>>>>>>  Python-Dev mailing list<br>
>> >>>>>>><br>
>> >>>>>>> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
>> >>>>>>>  <a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
>> >>>>>>>  Unsubscribe:<br>
>> >>>>>>><br>
>> >>>>>>><br>
>> >>>>>>> <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
>> >>>>>><br>
>> >>>>>><br>
>> >>>>>><br>
>> >>>>>><br>
>> >>>>>><br>
>> >>>>>>  --<br>
>> >>>>>>  --Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>>  --<br>
>> >>>>  --Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)<br>
>> >>>><br>
>> >>>> ________________________________<br>
>> >>>><br>
>> >>>>  Python-Dev mailing list<br>
>> >>>>  <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
>> >>>>  <a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
>> >>>>  Unsubscribe:<br>
>> >>>><br>
>> >>>> <a href="https://mail.python.org/mailman/options/python-dev/rymg19%40gmail.com" target="_blank">https://mail.python.org/mailman/options/python-dev/rymg19%40gmail.com</a><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>>  --<br>
>> >>>  Ryan<br>
>> >>>  If anybody ever asks me why I prefer C++ to C, my answer will be<br>
>> >>> simple:<br>
>> >>>  "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that<br>
>> >>> was<br>
>> >>>  nul-terminated."<br>
>> >>>  Personal reality distortion fields are immune to contradictory<br>
>> >>> evidence.<br>
>> >>> -<br>
>> >>>  srean<br>
>> >>>  Check out my website: <a href="http://kirbyfan64.github.io/" target="_blank">http://kirbyfan64.github.io/</a><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Sent from my Android phone with K-9 Mail. Please excuse my brevity.<br>
>> > Check out my website: <a href="http://kirbyfan64.github.io/" target="_blank">http://kirbyfan64.github.io/</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Ryan<br>
> If anybody ever asks me why I prefer C++ to C, my answer will be simple:<br>
> "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was<br>
> nul-terminated."<br>
> Personal reality distortion fields are immune to contradictory evidence. -<br>
> srean<br>
> Check out my website: <a href="http://kirbyfan64.github.io/" target="_blank">http://kirbyfan64.github.io/</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Ryan<div><div>If anybody ever asks me why I prefer C++ to C, my answer will be simple: "It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was nul-terminated."</div></div>Personal reality distortion fields are immune to contradictory evidence. - srean<div>Check out my website: <a href="http://kirbyfan64.github.io/" target="_blank">http://kirbyfan64.github.io/</a></div></div></div>
</div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4