public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mark Geisert <mark@maxrnd.com>
To: cygwin@cygwin.com
Subject: Re: segfault on 32bit cygwin snapshot
Date: Sat, 6 Mar 2021 13:38:08 -0800	[thread overview]
Message-ID: <f3d3d708-021c-7dfd-e079-28a53ed369e6@maxrnd.com> (raw)
In-Reply-To: <50e7662b-a935-f966-46a7-f865515bbcd9@cornell.edu>

Ken Brown via Cygwin wrote:
> On 3/5/2021 8:45 PM, Takashi Yano via Cygwin wrote:
>> On Fri, 5 Mar 2021 17:30:30 +0100
>> Marco Atzeri wrote:
>>> On 05.03.2021 15:42, Corinna Vinschen via Cygwin wrote:
>>>> On Mar  5 01:11, Mark Geisert wrote:
>>>>> Marco Atzeri via Cygwin wrote:
>>>>>> On 04.03.2021 21:17, Marco Atzeri wrote:
>>>>>>> On 04.03.2021 16:17, Ken Brown via Cygwin wrote:
>>>>>>>> On 3/4/2021 6:50 AM, Takashi Yano via Cygwin wrote:
>>>>>>>>> On Thu, 4 Mar 2021 12:11:11 +0100
>>>>>>>>> marco atzeri wrote:
>>>>>>>>>> I have no problem to patch Python to solve the issue,
>>>>>>>>>> but I have not seen evidence of the dlsym mechanism .
>>>>>>>>>> But of course I an NOT and expert in this field.
>>>>>>>>>>
>>>>>>>>>> If someone looking to the code can give me some hints,
>>>>>>>>>> I will appreciate
>>>>>>>>>
>>>>>>>>> I am also not sure where the dlsym() is used in python.
>>>>>>>>> At least, os.uname() works in python 3.8.7 and 2.7.18 in my
>>>>>>>>> environment even without that snippet. It seems that os.uname()
>>>>>>>>> does not use dlsym(). Do I overlook something?
>>>>>>>>
>>>>>>>> This all started because Mark reported a problem building python 3.8.3:
>>>>>>>>
>>>>>>>>      https://cygwin.com/pipermail/cygwin-apps/2020-December/040765.html
>>>>>>>> https://cygwin.com/pipermail/cygwin-developers/2020-December/012019.html
>>>>>>>>
>>>>>>>> It's strange that Marco never bumped into the problem.
>>>>>>>>
>>>>>>>> Ken
>>>>>>>
>>>>>>> I never built python using cygwin snapshots as Mark was trying to do,
>>>>>>> all my builds were using 3.1.7.
>>>>>>>
>>>>>>> Let me set a separate enviroment for building on latest snapshot
>>>>>>
>>>>>> I can not replicate with latest snapshot
>>>>>>
>>>>>> $ uname -svr
>>>>>> CYGWIN_NT-10.0-WOW 3.2.0s(0.340/5/3) 2021-03-01 15:42
>>>>>>
>>>>>> nor in 64bit when building 3.8.8
>>>>>>
>>>>>> For what I see the DLL is always using a proper import
>>>>>> from cygwin1.dll
>>>>>>
>>>>>> $ objdump -x libpython3.8.dll |grep uname
>>>>>>            2b9de0   2170  uname
>>>>>>            2b9de8   2171  uname_x
>>>>>>
>>>>>> the only thing not standard on my build system is a case sensitive
>>>>>> filesystem and mount
>>>>>
>>>>> I had concerns that I had somehow corrupted my build environment, and it was
>>>>> Marco's successes that convinced me to reinstall 3.1.7 to recover a
>>>>> known-good environment.  Then seeing Marco go ahead and release the
>>>>> different Python releases (yay!) I didn't investigate any further.
>>>>>
>>>>> I'm now trying to locate the os.uname usage of dlopen/dlsym again just for
>>>>> the record but am having some difficulty.  I'll reply again when I've got
>>>>> it.
>>>>
>>>> Guys,
>>>>
>>>> if it turns out that we fixed a problem that doesn't actually is a
>>>> real-world problem, I'm wondering if we shouldn't just revert the Cygwin
>>>> patch we're talking about here (commit 532b91d24e9496) and be done with
>>>> it.
>>>>
>>>> Special casing dynamic loading of uname just to support some experimental
>>>> bordercase doesn't make much sense.  In that case I'm all for "don't do
>>>> that"!
>>>>
>>>>
>>>> Corinna
>>>
>>>
>>> Python has a lot of problem but not this one for what I can see
>>>
>>> $ python3.8 /usr/lib/python3.8/test/pythoninfo.py  | grep uname
>>> os.uname: posix.uname_result(sysname='CYGWIN_NT-10.0-19041-WOW64',
>>> nodename='LAPTOP-82F08ILC', release='3.1.7-340.i686',
>>> version='2020-08-22 19:03 UTC', machine='i686')
>>>
>>> and similar for the other version
>>
>> I also tried to build python 3.8.7, 3.8.3 and 3.7.9 under cygwin 32bit
>> and 64bit current git head with the commit 532b91d2 reverted. All trials
>> resulted in success. Moreover, os.uname() works expectedly.
>>
>> That is, the problem reported by Mark could not be reproduced.
>> https://cygwin.com/pipermail/cygwin-apps/2020-December/040765.html
>>
>> Updating something other than cygwin1.dll might fix the issue???
> 
> I wonder if Mark had a corrupt libcygwin.a installed at the time he encountered 
> this problem.  That would explain his observations, except for the claim that 
> python was calling uname via dlopen/dlsym.  I guess he's rechecking that claim. 
>   Mark, FWIW, I looked at the git history of python's Modules/posixmodule.c, and I 
> can't see where they ever did this.

I must be mistaken.  I appreciate everyone's help and patience while I tried to 
reproduce what I (thought I) was seeing last December.  I'm going to stand down on 
this topic as I think I'm only adding noise.  Please proceed on Corinna's course.
Thanks & Cheers,

..mark

  reply	other threads:[~2021-03-06 21:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20 21:01 Marco Atzeri
2021-02-20 22:29 ` Takashi Yano
2021-02-28 18:48   ` Marco Atzeri
2021-03-01  0:55     ` Takashi Yano
2021-03-01  8:41       ` Takashi Yano
2021-03-01 11:26         ` Takashi Yano
2021-03-01 12:17           ` marco atzeri
2021-03-01 12:25       ` Takashi Yano
2021-03-02 11:03         ` Takashi Yano
2021-03-02 15:48           ` Corinna Vinschen
2021-03-03  9:56             ` Takashi Yano
2021-03-03 11:00               ` Corinna Vinschen
2021-03-04  9:05                 ` Mark Geisert
2021-03-04 16:11                   ` Corinna Vinschen
2021-03-05  9:18                     ` Mark Geisert
2021-03-05 14:37                       ` Corinna Vinschen
2021-03-04  9:05                 ` Takashi Yano
2021-03-04 11:11                   ` marco atzeri
2021-03-04 11:50                     ` Takashi Yano
2021-03-04 15:17                       ` Ken Brown
2021-03-04 15:54                         ` Corinna Vinschen
2021-03-04 20:17                         ` Marco Atzeri
2021-03-05  8:09                           ` Marco Atzeri
2021-03-05  9:11                             ` Mark Geisert
2021-03-05 14:42                               ` Corinna Vinschen
2021-03-05 16:30                                 ` Marco Atzeri
2021-03-06  1:45                                   ` Takashi Yano
2021-03-06 17:16                                     ` Ken Brown
2021-03-06 21:38                                       ` Mark Geisert [this message]
2021-03-05 22:55                                 ` Mark Geisert
2021-03-08 11:07                                   ` Mark Geisert
2021-03-08 14:01                                     ` Corinna Vinschen
2021-03-04 15:52                   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3d3d708-021c-7dfd-e079-28a53ed369e6@maxrnd.com \
    --to=mark@maxrnd.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).