Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-26 Thread Andriy Gapon
on 26/05/2011 03:35 Raphael Kubo da Costa said the following:
> If I compile the port myself, I can't run any binary (PR ports/152896,
> which has been unanswered despite my efforts):
> 
>   Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't
>   do that.  Symbol format `elf64-x86-64-freebsd' unknown.
> 

This is a somewhat known issue that John was going to fix a while ago.

-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: DEBUG - analysing core dumps

2011-05-26 Thread Damien Fleuriot


On 5/25/11 7:10 PM, Garrett Cooper wrote:
> On Wed, May 25, 2011 at 9:36 AM, Damien Fleuriot  wrote:
>> Hello list,
>>
>>
>>
>> We've got these boxes at work running FreeBSD 8.1-STABLE amd64 and
>> serving as firewalls and openvpn gateways.
>>
>> We use CARP interfaces to provide an active-passive fault tolerant system.
>>
>>
>> Today, we received a nagios alert from the master box saying it's
>> rsyslogd process had crashed.
>>
>> I logged on to it and tried to relaunch it, to no avail:
>> pid 2303 (rsyslogd), uid 0: exited on signal 11 (core dumped)
>>
>>
>>
>>
>> I would like advice on how to debug the output from the core dump.
>>
>> This is what I get from gdb:
>>
>> # gdb
>> GNU gdb 6.1.1 [FreeBSD]
>> Copyright 2004 Free Software Foundation, Inc.
>> GDB is free software, covered by the GNU General Public License, and you are
>> welcome to change it and/or distribute copies of it under certain
>> conditions.
>> Type "show copying" to see the conditions.
>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>> This GDB was configured as "amd64-marcel-freebsd".
>> (gdb) core rsyslogd.core
>> Core was generated by `rsyslogd'.
>> Program terminated with signal 11, Segmentation fault.
>> #0  0x004258ec in ?? ()
>>
>>
>>
>>
>> Sadly, getting a backtrace with "bt" gives me more lines with "??",
>> which is totally not helpful:
>> [SNIP]
>> #13 0x7f1f9d70 in ?? ()
>> #14 0x in ?? ()
>> #15 0x6f70732f7261762f in ?? ()
>> #16 0x6c737973722f6c6f in ?? ()
>> #17 0x5f6e70766f2f676f in ?? ()
>> #18 0x746174732e676f6c in ?? ()
>> #19 0x0065 in ?? ()
>> #20 0x in ?? ()
>> [SNIP]
>>
>> I am not sure what steps I should follow to get more information ?
>>
>>
>>
>> Also, I believe that often, core dumps with signal 11 = RAM problems and
>> I would like a confirmation here.
>>
>> I am concerned because rsyslogd is the only process that crashes in this
>> way, even after I rebooted the firewall.
> 
> Rebuild and reinstall rsyslogd with debug symbols and see if you
> can get a reasonable stack trace. Something else to try before that to
> narrow down the problem section of code is ktrace/kdump it, or truss
> it, and see if it's trying to open/read from a file and failing.
> Thanks,
> -Garrett




Thanks everyone for your answers, I'll recompile with DEBUG and obtain a
new core dump.

I'll also investigate the possibility of corrupted spool files and post
the resolution here :)


--
dfl
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: DEBUG - analysing core dumps

2011-05-26 Thread Damien Fleuriot
On 26 May 2011 09:51, Damien Fleuriot  wrote:
>
>
> On 5/25/11 7:10 PM, Garrett Cooper wrote:
>> On Wed, May 25, 2011 at 9:36 AM, Damien Fleuriot  wrote:
>>> Hello list,
>>>
>>>
>>>
>>> We've got these boxes at work running FreeBSD 8.1-STABLE amd64 and
>>> serving as firewalls and openvpn gateways.
>>>
>>> We use CARP interfaces to provide an active-passive fault tolerant system.
>>>
>>>
>>> Today, we received a nagios alert from the master box saying it's
>>> rsyslogd process had crashed.
>>>
>>> I logged on to it and tried to relaunch it, to no avail:
>>> pid 2303 (rsyslogd), uid 0: exited on signal 11 (core dumped)
>>>
>>>
>>>
>>>
>>> I would like advice on how to debug the output from the core dump.
>>>
>>> This is what I get from gdb:
>>>
>>> # gdb
>>> GNU gdb 6.1.1 [FreeBSD]
>>> Copyright 2004 Free Software Foundation, Inc.
>>> GDB is free software, covered by the GNU General Public License, and you are
>>> welcome to change it and/or distribute copies of it under certain
>>> conditions.
>>> Type "show copying" to see the conditions.
>>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>>> This GDB was configured as "amd64-marcel-freebsd".
>>> (gdb) core rsyslogd.core
>>> Core was generated by `rsyslogd'.
>>> Program terminated with signal 11, Segmentation fault.
>>> #0  0x004258ec in ?? ()
>>>
>>>
>>>
>>>
>>> Sadly, getting a backtrace with "bt" gives me more lines with "??",
>>> which is totally not helpful:
>>> [SNIP]
>>> #13 0x7f1f9d70 in ?? ()
>>> #14 0x in ?? ()
>>> #15 0x6f70732f7261762f in ?? ()
>>> #16 0x6c737973722f6c6f in ?? ()
>>> #17 0x5f6e70766f2f676f in ?? ()
>>> #18 0x746174732e676f6c in ?? ()
>>> #19 0x0065 in ?? ()
>>> #20 0x in ?? ()
>>> [SNIP]
>>>
>>> I am not sure what steps I should follow to get more information ?
>>>
>>>
>>>
>>> Also, I believe that often, core dumps with signal 11 = RAM problems and
>>> I would like a confirmation here.
>>>
>>> I am concerned because rsyslogd is the only process that crashes in this
>>> way, even after I rebooted the firewall.
>>
>>     Rebuild and reinstall rsyslogd with debug symbols and see if you
>> can get a reasonable stack trace. Something else to try before that to
>> narrow down the problem section of code is ktrace/kdump it, or truss
>> it, and see if it's trying to open/read from a file and failing.
>> Thanks,
>> -Garrett
>
>
>
>
> Thanks everyone for your answers, I'll recompile with DEBUG and obtain a
> new core dump.
>
> I'll also investigate the possibility of corrupted spool files and post
> the resolution here :)
>
>
> --
> dfl
>


Turns out that after rebuilding rsyslog4-relp with -DWITH_DEBUG , the
new daemon works just fine and doesn't sig11 anymore.
Odd, but well, solves my problem.

I will upgrade it on all the other boxes then.

Thanks for the help guys

--
dfl
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


X11 in a jail (was: Re: NFS mount inside jail fails)

2011-05-26 Thread Alexander Leidinger
Quoting Doug Ambrisko  (from Wed, 25 May 2011  
09:42:20 -0700 (PDT)):


CCing jails@


Alexander Leidinger writes:
| Quoting Doug Ambrisko  (from Thu, 19 May 2011
| 14:38:40 -0700 (PDT)):
|
| > Alexander Leidinger writes:
| > | On Thu, 19 May 2011 10:24:59 -0700 (PDT) Doug Ambrisko
| > |  wrote:
| > |
| > | > doesn't have access to it anymore either.  Running an X server in a
| > | > vimage has some issues.  Most are pretty easy to over-come.
| > |
| > | Are you using my patch
| > | (http://www.leidinger.net/FreeBSD/current-patches/0_jail.diff) + a
| > | custom devfs.rules to get the 2D part (the last time I tried the DRI
| > | part of my patch, it paniced the machine) of the X server working in a
| > | jail, or did you come up with something yourself? If it is the later, I
| > | would be interested how you did it.
| >
| > Nope, didn't know about it when I played with it.  I should try it.
| > I added
| >  case PRIV_IO:
| >  return (0);
| >
| > to kern_jail.c to get X to work.  This was with the Intel graphics.
| > The main problem I have now is on resume the X server dies and restarts.
| > I use xdm.  Without jail with vimage then it works okay.
|
| I use it without vimage in a jail. This is with a radeon card
| (corresponding kernel module loaded at boot to get 2D acceleration, as
| the X server obviously can not load modules in a jail).
|
| > My laptop can use either Intel or ATI graphics.  I just switched it to
| > ATI to see what happens.  I should try some more tests.  It seems
| > my BIOS likes to reset this setting and enable both :-(
| >
| > I don't seem to have panics.  This is with a month or so old -current.
|
| You do not allow access to the dri device, so I do not expect a panic.
| If you give access to the dri device (which can be enabled separately
| in my patch), I would not be surprised to see a panic (the last time I
| tried it is a year or two ago, I didn't take the time to investigate
| why it panics).

Okay, I have an update.  With Intel graphics and using dri things
work better and I don't get panics.  I load drm.ko & i915.ko before


Just to make sure we talk about the same things:
Did you configure the X server to use 3D (dri and glx in the modules  
section, dri section in the X11 config, dri device visible in devfs)?  
xdriinfo shows some valid hardware acceleration?


If yes, I definitively have to test the 3D part again with my radeon  
(with a normal jail and with a vimage jail in case the normal jail  
fails).



starting the vimage jail.  X sees it and uses it.  This solves the
suspend/resume issue I had.  The dri issue also prevented suspend and
resume fail to work in a chroot.

I have not tried switching to using the ATI option.  On a plus side
my laptop is running cooler and faster now.


If you didn't had loaded i915.ko before, you have at least 2D accel  
now, and probably the power management of the chip got activated too.


Bye,
Alexander.

--
Hope that the day after you die is a nice day.

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-26 Thread John Baldwin
On Wednesday, May 25, 2011 8:35:28 pm Raphael Kubo da Costa wrote:
> Dmitry Krivenok  writes:
> 
> > As you can see program exited normally w/o any errors.
> > Then I run the same program under gdb-7.2
> >
> > $ /usr/local/bin/gdb72 --args t
> > GNU gdb (GDB) 7.2 [GDB v7.2 for FreeBSD]
> > Copyright (C) 2010 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later 

> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> > and "show warranty" for details.
> > This GDB was configured as "x86_64-portbld-freebsd8.2".
> > For bug reporting instructions, please see:
> > ...
> > Reading symbols from /big/work/coverage/csxroot/src/t/t...done.
> > (gdb) r
> > Starting program: /big/work/coverage/csxroot/src/t/t
> > [New LWP 100162]
> > [New Thread 800a041c0 (LWP 100162)]
> > [New Thread 800a0ae40 (LWP 100171)]
> > [Thread 800a0ae40 (LWP 100171) exited]
> > Invalid selected thread.
> > (gdb) q
> > A debugging session is active.
> >
> >Inferior 1 [process 7756] will be killed.
> >
> > Quit anyway? (y or n) y
> > $
> >
> > In this case I got "Invalid selected thread." right after the thread has 
exited.
> > Looks like gdb is unable to switch to another thread.
> 
> In my case, I get the following error when running your program (and
> many others) with the gdb72 package (installed via portmaster -PP
> devel/gdb):
> 
> (gdb) r
> Starting program: /tmp/test-base
> [New LWP 100315]
> Cannot get thread info, Thread ID=100315, generic error
> (gdb) q
> A debugging session is active.
> 
> Inferior 1 [process 84832] will be killed.
> 
> Quit anyway? (y or n) y
> 
> If I compile the port myself, I can't run any binary (PR ports/152896,
> which has been unanswered despite my efforts):
> 
>   Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't
>   do that.  Symbol format `elf64-x86-64-freebsd' unknown.

You need to unininstall libreadline, or turn off the hack to try to use
libreadline from ports.  There is no easy way to fix the gdb build to
use /usr/local only for the bits that need readline and not have it use
the wrong binutils headers from /usr/local as well.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-26 Thread John Baldwin
On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote:
> on 26/05/2011 03:35 Raphael Kubo da Costa said the following:
> > If I compile the port myself, I can't run any binary (PR ports/152896,
> > which has been unanswered despite my efforts):
> > 
> >   Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't
> >   do that.  Symbol format `elf64-x86-64-freebsd' unknown.
> > 
> 
> This is a somewhat known issue that John was going to fix a while ago.

Actually, it's not really fixable if you have libreadline installed from ports 
and binutils installed from ports.  I'd like to just remove the hack to use
libreadline from ports if possible.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-26 Thread Andriy Gapon
on 26/05/2011 16:33 John Baldwin said the following:
> On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote:
>> on 26/05/2011 03:35 Raphael Kubo da Costa said the following:
>>> If I compile the port myself, I can't run any binary (PR ports/152896,
>>> which has been unanswered despite my efforts):
>>>
>>>   Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't
>>>   do that.  Symbol format `elf64-x86-64-freebsd' unknown.
>>>
>>
>> This is a somewhat known issue that John was going to fix a while ago.
> 
> Actually, it's not really fixable if you have libreadline installed from 
> ports 
> and binutils installed from ports.  I'd like to just remove the hack to use
> libreadline from ports if possible.

I referred to this option as a fix.

-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: MD ROOT and image size limitation (makes kernel panic)

2011-05-26 Thread rank1seeker
Ok now, all works great IF md root, isn't statically compiled, into the kernel.

When I statically compile it, into the kernel, I get ROOT MOUNT error.
When I list available devices via '?', md0 does exist!

I point mountroot to it, but nada, I get MOUNT ROOT ERROR.
I've tried to statically compile, BOTH gzip-ed image (~87 Mb) and non 
compressed image (~197 Mb), of md root.

With both, md0 exist at mountroot, but when manually pointed to md0, I get 
MOUNT ROOT ERROR

Is this a bug?
As it doesn't expect so huge kernel of i.e; ~220 Mb

Just to say, that md0, DOESN'T have a partition or bsdlabel, just UFS


Domagoj Smolčić
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


USENIX WebApps '11 Early Bird Registration Deadline Extended

2011-05-26 Thread Lionel Garth Jones
There's still time! Join us in Portland, OR, June 15-16, 2011, for the
2nd USENIX Conference on Web Application Development. The Early Bird
Registration Deadline has been extended. Register by Tuesday, May 31,
2011, for the greatest savings.
http://www.usenix.org/events/fcw11/registration/

WebApps '11 is designed to bring together experts in all aspects of
developing and deploying Web applications. The program features
cutting-edge research that advances the state of the art, not only
on novel Web applications but also on infrastructure, tools, and
techniques that support the development, analysis/testing, operation, or
deployment of those applications. Take advantage of this opportunity for
interaction and synergy across these areas.

The technical program includes:
* Invited Talks:
-- "Software G Forces: The Effects of Acceleration," by Kent Beck of
Facebook, the inventor of Extreme Programming

-- Panel on "The Future of Client-side Web Apps," moderated by Michael
Maximilien, IBM Research; including panelists: Patrick Chanezon, Google,
Inc.; Charles Ying, Flipboard, Inc.; Erik Meijer, Microsoft Corp.; Raffi
Krikorian, Twitter, Inc.

-- Keynote Address: "An Agenda for Empirical Cyber Crime Research," by
Stefan Savage, UCSD

-- Plenary Talk: "Dead Media: What the Obsolete, Unsuccessful,
Experimental, and Avant-Garde Can Teach Us About the Future of Media,"
by Finn Brunton, NYU

-- "Helping Humanity with Phones and Clouds," by Matthew Faulkner and
Michael Olson, Caltech

-- "Linux PC Robot," by Mark Woodward, Mohawksoft

* Refereed papers that present the latest research in developing and
deploying Web applications.

* A Poster Session and Happy Hour held jointly with USENIX ATC '11. The
poster session provides a great way to let other people know about your
work and to get useful feedback from the community. Poster submissions
are due Monday, May 30, at 9:00 p.m. PDT. Find out more here:
http://www.usenix.org/events/atc11/poster.html

Check out the full program here:
http://www.usenix.org/events/webapps11/tech/

Plus, don't miss the opportunity to mingle with colleagues and leading
experts in the combined Birds-of-a-Feather sessions (BoFs) and at the
other evening social events, vendor BoFs, and receptions.

Because WebApps '11 is part of the USENIX Federated Conferences Week,
you can create your own conference experience. Your daily registration
gets you into all the events happening that day: tutorials, talks,
workshops--you name it. Plus, registration packages offer expanded
discounts: the more days you attend, the more you save!

I look forward to seeing you in Portland!

Armando Fox, University of California, Berkeley
WebApps '11 Program Chair
webapps11ch...@usenix.org

2nd USENIX Conference on Web Application Development (WebApps '11)
June 15-16, 2011
Portland, OR
Part of USENIX Federated Conferences Week, June 14-17, 2011
http://www.usenix.org/webapps11/progb/
Early Bird Registration Extended Deadline: May 31, 2011

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-26 Thread Raphael Kubo da Costa
Andriy Gapon  writes:

> on 26/05/2011 16:33 John Baldwin said the following:
>> On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote:
>>> on 26/05/2011 03:35 Raphael Kubo da Costa said the following:
 If I compile the port myself, I can't run any binary (PR ports/152896,
 which has been unanswered despite my efforts):

   Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't
   do that.  Symbol format `elf64-x86-64-freebsd' unknown.

>>>
>>> This is a somewhat known issue that John was going to fix a while ago.
>> 
>> Actually, it's not really fixable if you have libreadline installed from 
>> ports 
>> and binutils installed from ports.  I'd like to just remove the hack to use
>> libreadline from ports if possible.
>
> I referred to this option as a fix.

Thanks, removing readline from ports worked like a charm after I
recompiled devel/gdb. Installing it from the package still doesn't work,
though.

Shouldn't the hack in the port be reversed, ie. if readline from ports
is installed the port is marked as BROKEN?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"