Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: Thu, 8 May 2003 15:03:41 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Kern Sibbald cc: cygwin AT cygwin DOT com Subject: Re: pthread_signal() references illegal memory address In-Reply-To: <1052391117.6139.1146.camel@rufus> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 8 May 2003, Kern Sibbald wrote: > Hello, > > Please don't think I'm not interested in this if > it takes a bit of time to get back to you ... > > See responses below: > > > On Mon, 2003-05-05 at 19:30, Igor Pechtchanski wrote: > > 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: > > > > [snip] > > > > > 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. > > My service always interacts with the desktop. It is capable of > doing MessageBox(), and it always has an icon in the system tray > with a menu that works. > > I get absolutely nothing in terms of output of any sort when > the program crashes -- as I said, it goes poof. This could > be my own fault for trapping signals, but normally during > signal handling there is a considerable amount of printout, > ... > > > > > 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. > > There is no stack dump or any other file in the directory from > which the program (Bacula) executes. > > > > > > > Did you try setting > > > > "error_start:c:/cygwin/bin/dumper.exe" in your CYGWIN environment > > > > variable? > > I doubt this would help much, maybe I am wrong, please see below. > > > > > > > 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. > > None of the above mentioned things exist on my system. In any case, > I have no problem setting the program up as a service (it installs > itself with allowing interaction with the desktop by default). > > > > > 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