delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/05/13:30:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Mon, 5 May 2003 13:30:00 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Kern Sibbald <kern AT sibbald DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Bug report
In-Reply-To: <1052154862.5361.957.camel@rufus>
Message-ID: <Pine.GSO.4.44.0305051322380.25128-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On 5 May 2003, Kern Sibbald wrote:

> Hello,
>
> On Mon, 2003-05-05 at 18:38, Igor Pechtchanski wrote:
> > On 5 May 2003, Kern Sibbald wrote:
> >
> > > I guess you guys (and gal) really don't want bug
> > > reports because it is not at all obvious where
> > > to send them.
> >
> > This is the right place.
>
> Great.
>
> > > Anyway here is one:
> > >
> > > Running WinXP Home version.
> > >
> > > Using Cygwin 1.3.20
> > >
> > > When running my program with LocalSystem userid
> > > as a service, doing a pthread_kill(thread_id, SIGUSR2)
> > > causes some sort of memory fault referencing memory at 0x3a
> > > (or something like that because the program disappears
> > > poof).
> > >
> > > Running as a normal user works fine.
> >
> > What's the exact error message (I assume you get a popup box)?
>
> No, I get absolutely nothing. Poof and it is gone, well, the
> service manager knows it went away but not why.
>
> A friend ran the program on Win2K and he got:
>
>       Instruction at 0x0041276a referenced memory at 0x3c
>
> That appears to be somewhere in the cygwin1.dll.

Try checking the "Allow service to interact with the desktop" box, and you
should see the error popup on your system too.

> > Is there a stacktrace file generated?
>
> If it is, I don't know where the system put it.

The system should put it in the directory from which the program is run.

> >   Did you try setting
> > "error_start:c:/cygwin/bin/dumper.exe" in your CYGWIN environment
> > variable?
>
> No, if you can tell me how to set the environment variable for
> a service, I'll try it, but since it is a service, I am unlikely
> to get any output.

"cygrunsrv --help", or "man cygrunsrv", or see /bin/ssh-host-config for an
example.  You might also need the "Allow service to interact with desktop"
bit.

> > Did you try running the program from the command line in a
> > LocalSystem-owned shell?
>
> I ran it in an rxvt shell under my id and it does not crash.
> Tell me how to get a LocalSystem owned shell and I will try
> it.  This is XP Home, so I don't have access to a lot of the
> XP security dialogs.

"at <time> /interactive c:\cygwin\bin\bash.exe -i --login"
(<time> should be current time however long you're willing to wait, at
least one minute).  "at /?" for help.
[Note, this works on Win2k, don't know about XP Home].

> > Can you provide a simple testcase that
> > reproduces your problem?
>
> Probably not as my program is some 65K+ lines of code.

You could try a simple program that calls the offending function (after
creating some threads, most likely), and see if the problem manifests...

> I've solved the problem for myself by doing the "signal"
> a different way, so it is not critical for me but it cost
> about 8 hours of debugging -- primarily due to the fact that
> it seems to be dependent on whether or not it is a service.
>
> Best regards,
> Kern

It's most likely dependent on the value of your CYGWIN variable or some
permissions (as the service runs as LocalSystem).  Trying the program out
from a LocalSystem-owned window (see above) should give you some idea of
what's at fault.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019