Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Ian Smith
On Mon, 20 Jul 2009, Mark Andrews wrote:
 > In message <4ad871310907191717g1ed90be7y92250f2addc38...@mail.gmail.com>, 
 > Glen 
 > Barber writes:
 > > Possibly off-topic...
[..]
 > > > My understanding was this:
 > > >
 > > > If you specify 'sh foo.sh' at the shell, the script will be run in a
 > > > /bin/sh shell, _unless_ you override the shell _in_ the script.
 > > >
 > > > Ie, 'sh foo.sh' containing '#!/bin/sh' being redundant, but 'zsh
 > > > foo.sh' containing '#!/bin/sh' would execute using zsh.
 > > >
 > > >
 > > 
 > > I meant to say in the last line: "'#!/bin/sh' would override the 'zsh' 
 > > shel=
 > > l."
 > > 
 > > Can someone enlighten me if I am wrong about this?
 >
 > "#!" is used to define the interpretor when the file is exec'd.
 > 
 > perl, AFAIK, is the only interpretor that will look at what is after
 > the "#!" and modify it's behaviour.  All other a interpretors (shells)
 > treat "#!" as a comment.
 > 
 > Some shells used to examine the executable about to be called and
 > looked for "#!" and invoke the correct interpretor.  This was how
 > "#!" was supported before kernels has support for "#!".  It was all
 > done in userland.

Some rexx scripts begin with this cute trick so they may be executed in 
any (UNIXish) shell as 'program', or specifically as 'rexx program', 
where it's just a regular rexx comment:

/*usr/bin/true;exec rexx -x "$0" "$@";exit# ReXX */
  /* Take a measure of REXX clauses-per-second (CPS) */
  /* Mike Cowlishaw (m...@ibm.com).  Multi-platform.  */
  /* 1.0 17 Jan 89 Original version  */

though I never understood why an exit would be needed after an exec .. 
just making sure I guess, or maybe catering for some variant or other.

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


Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Glen Barber
On Sun, Jul 19, 2009 at 9:02 PM, Mark Andrews wrote:
>
> In message <4ad871310907191717g1ed90be7y92250f2addc38...@mail.gmail.com>, Glen
> Barber writes:
>> Possibly off-topic...
>>
>>
>> 2009/7/19 Glen Barber :
>> > 2009/7/19 Romain Tarti=E8re :
>> >> Hi Glen,
>> >>
>> >> On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote:
>> >>> > % sh foo.sh
>> >>> > % zsh foo.sh
>> >>> > % bash foo.sh
>> >>> What happens if you replace '#!/bin/sh' with '#!/usr/local/bin/zsh' ?
>> >>
>> >> This is not related to my problem since I am not running the script
>> >> using ./foo.sh but directly using the proper shell. =A0sh just behaves
>> >> differently, that looks odd so I would like to know if it is a bug in sh
>> >> or if there is no specification for this and the behaviour depends of
>> >> the implementation of each shell, in which case I have to tweak the
>> >> script I am porting to avoid this construct (passing $? as an argument
>> >> for example).
>> >>
>> >> Romain
>> >>
>> >
>> > My understanding was this:
>> >
>> > If you specify 'sh foo.sh' at the shell, the script will be run in a
>> > /bin/sh shell, _unless_ you override the shell _in_ the script.
>> >
>> > Ie, 'sh foo.sh' containing '#!/bin/sh' being redundant, but 'zsh
>> > foo.sh' containing '#!/bin/sh' would execute using zsh.
>> >
>> >
>>
>> I meant to say in the last line: "'#!/bin/sh' would override the 'zsh' shel=
>> l."
>>
>> Can someone enlighten me if I am wrong about this?
>>
>
> "#!" is used to define the interpretor when the file is exec'd.
>
> perl, AFAIK, is the only interpretor that will look at what is after
> the "#!" and modify it's behaviour.  All other a interpretors (shells)
> treat "#!" as a comment.
>
> Some shells used to examine the executable about to be called and
> looked for "#!" and invoke the correct interpretor.  This was how
> "#!" was supported before kernels has support for "#!".  It was all
> done in userland.
>

Hi, Mark.

You've given me enough information to point me in the right direction
on digging further into this.  Thanks, and I appreciate the response!


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


Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Mark Andrews

In message <4ad871310907191717g1ed90be7y92250f2addc38...@mail.gmail.com>, Glen 
Barber writes:
> Possibly off-topic...
> 
> 
> 2009/7/19 Glen Barber :
> > 2009/7/19 Romain Tarti=E8re :
> >> Hi Glen,
> >>
> >> On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote:
> >>> > % sh foo.sh
> >>> > % zsh foo.sh
> >>> > % bash foo.sh
> >>> What happens if you replace '#!/bin/sh' with '#!/usr/local/bin/zsh' ?
> >>
> >> This is not related to my problem since I am not running the script
> >> using ./foo.sh but directly using the proper shell. =A0sh just behaves
> >> differently, that looks odd so I would like to know if it is a bug in sh
> >> or if there is no specification for this and the behaviour depends of
> >> the implementation of each shell, in which case I have to tweak the
> >> script I am porting to avoid this construct (passing $? as an argument
> >> for example).
> >>
> >> Romain
> >>
> >
> > My understanding was this:
> >
> > If you specify 'sh foo.sh' at the shell, the script will be run in a
> > /bin/sh shell, _unless_ you override the shell _in_ the script.
> >
> > Ie, 'sh foo.sh' containing '#!/bin/sh' being redundant, but 'zsh
> > foo.sh' containing '#!/bin/sh' would execute using zsh.
> >
> >
> 
> I meant to say in the last line: "'#!/bin/sh' would override the 'zsh' shel=
> l."
> 
> Can someone enlighten me if I am wrong about this?
> 
> --=20
> Glen Barber
> ___
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

"#!" is used to define the interpretor when the file is exec'd.

perl, AFAIK, is the only interpretor that will look at what is after
the "#!" and modify it's behaviour.  All other a interpretors (shells)
treat "#!" as a comment.

Some shells used to examine the executable about to be called and
looked for "#!" and invoke the correct interpretor.  This was how
"#!" was supported before kernels has support for "#!".  It was all
done in userland.

Mark
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Glen Barber
Possibly off-topic...


2009/7/19 Glen Barber :
> 2009/7/19 Romain Tartière :
>> Hi Glen,
>>
>> On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote:
>>> > % sh foo.sh
>>> > % zsh foo.sh
>>> > % bash foo.sh
>>> What happens if you replace '#!/bin/sh' with '#!/usr/local/bin/zsh' ?
>>
>> This is not related to my problem since I am not running the script
>> using ./foo.sh but directly using the proper shell.  sh just behaves
>> differently, that looks odd so I would like to know if it is a bug in sh
>> or if there is no specification for this and the behaviour depends of
>> the implementation of each shell, in which case I have to tweak the
>> script I am porting to avoid this construct (passing $? as an argument
>> for example).
>>
>> Romain
>>
>
> My understanding was this:
>
> If you specify 'sh foo.sh' at the shell, the script will be run in a
> /bin/sh shell, _unless_ you override the shell _in_ the script.
>
> Ie, 'sh foo.sh' containing '#!/bin/sh' being redundant, but 'zsh
> foo.sh' containing '#!/bin/sh' would execute using zsh.
>
>

I meant to say in the last line: "'#!/bin/sh' would override the 'zsh' shell."

Can someone enlighten me if I am wrong about this?

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


Re: HEADS-UP: Shared Library Versions bumped...

2009-07-19 Thread Byung-Hee HWANG
Ken Smith  writes:

> First I want to apologize.  This should have happened a bit sooner in
> our release cycle than now.  To be honest I had slipped into "We have
> symbol versioning for our libraries now" mode.  But only a few of the
> libraries currently have that turned on and I sorta forgot we still need
> to deal with all the shared libraries that do not have symbol versioning
> enabled yet.  Sorry for the hassle this will cause.
>
> Today with svn commit 195767 I bumped the version number of all
> non-symbol-version-ed shared libraries in preparation for 8.0-REL.  We
> do this just in case API/ABI changes occured in head between 7.0 and
> now, it lets us provide the older library versions as "compatibility
> library ports" in the ports tree.
>
> The problem is that as of the next time you update a machine that had
> been running -current you are best off reinstalling all ports or other
> applications you have on the machine.  When you reboot after doing the
> update to the base system everything you have installed will still work
> because the old shared library versions will still be there.  However
> anything you build on the machine after its base system gets updated
> would be linked against the newer base system shared libraries but any
> libraries that are part of ports or other applications (e.g. the Xorg
> libraries) would have been linked against the older library versions.
> You really don't want to leave things that way.
>
> The ports folks will be starting up a fresh package build now but it
> takes some time for full package runs like this to complete, get
> uploaded, and then propagate out to the mirrors.  If you tend to use
> pre-built packages instead of building them as ports yourself you might
> want to just hold off on updating anything until they let us know a
> fresh set of packages is available.  And BETA3 will definitely be
> scheduled for after the fresh set of packages becomes available.
>
> And again - sorry for the hassle.

In my case, there is no upgrade with servers -- i have two servers
(4.11-STABLE, 6.3-RELEASE). So plz don't worry. Only what i do upgrade
is client which is my main desktop -- currently it runs as
7.2-RELEASE. Though! Don't worry because always i do upgrade as follow: 
=> csup => make world => reboot
=> (after coffee time)  
=> pkg_delete -af => pkg_add -r -v gnome (with several package)

That's very fine and fast for me, anyway...

-- 
Byung-Hee HWANG, KNU
∑ WWW: http://izb.knu.ac.kr/~bh/

"Come on, stick it in. Stick it in, Johnny, that's what you really want."
-- Margot Ashton, "Chapter 1", page 12
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Value of $? lost in the beginning of a function.

2009-07-19 Thread Oliver Pinter
do you plan to MFC this fix?


On 7/19/09, Romain Tartière  wrote:
> On Sun, Jul 19, 2009 at 10:47:55PM +0200, Jilles Tjoelker wrote:
>> This has been fixed in 8.x:
> Cool, thanks!
>
> --
> Romain Tartière http://romain.blogreen.org/
> pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
> (plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
>
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


new umass panic on 7-stable built today

2009-07-19 Thread Juergen Lock
Hi!

 So I wanted to use an usb key on this freshly updated 7-stable box,
and got a panic just after plugging it in: :(

zsh triton# kgdb /boot/kernel/kernel.symbols /var/crash/vmcore.9
...
umass0:  on uhub5
umass0:1:0:-1: Attached to scbus1


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x290
fault code  = supervisor read data, page not present
instruction pointer = 0x8:0x804d67d4
stack pointer   = 0x10:0xff8085487da0
frame pointer   = 0x10:0xff8085487de0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 38 (usb5)
trap number = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
panic() at panic+0x182
trap_fatal() at trap_fatal+0x2b3
trap_pfault() at trap_pfault+0x294
trap() at trap+0x312
calltrap() at calltrap+0x8
--- trap 0xc, rip = 0x804d67d4, rsp = 0xff8085487da0, rbp = 
0xff8085487de0 ---
usb_transfer_complete() at usb_transfer_complete+0x1d4
bus_dmamap_load() at bus_dmamap_load+0x314
usbd_transfer() at usbd_transfer+0xee
usbd_do_request_flags_pipe() at usbd_do_request_flags_pipe+0x8f
usbd_do_request_flags() at usbd_do_request_flags+0x25
usbd_get_string_desc() at usbd_get_string_desc+0x9b
usbd_get_string() at usbd_get_string+0x83
uhub_child_pnpinfo_str() at uhub_child_pnpinfo_str+0xd9
devaddq() at devaddq+0xd5
device_attach() at device_attach+0x13a
usbd_new_device() at usbd_new_device+0x821
uhub_explore() at uhub_explore+0x1bd
usb_discover() at usb_discover+0x38
usb_event_thread() at usb_event_thread+0x8a
fork_exit() at fork_exit+0x11f
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xff8085488d30, rbp = 0 ---
Uptime: 1m1s
Physical memory: 8176 MB
Dumping 4605 MB: 4590 4574 4558 4542 4526 4510 4494 4478 4462 4446 4430 4414 
4398 4382 4366 4350 4334 4318 4302 4286 4270 4254 4238 4222 4206 4190 4174 4158 
4142 4126 4110 4094 4078 4062 4046 4030 4014 3998 3982 3966 3950 3934 3918 3902 
3886 3870 3854 3838 3822 3806 3790 3774 3758 3742 3726 3710 3694 3678 3662 3646 
3630 3614 3598 3582 3566 3550 3534 3518 3502 3486 3470 3454 3438 3422 3406 3390 
3374 3358 3342 3326 3310 3294 3278 3262 3246 3230 3214 3198 3182 3166 3150 3134 
3118 3102 3086 3070 3054 3038 3022 3006 2990 2974 2958 2942 2926 2910 2894 2878 
2862 2846 2830 2814 2798 2782 2766 2750 2734 2718 2702 2686 2670 2654 2638 2622 
2606 2590 2574 2558 2542 2526 2510 2494 2478 2462 2446 2430 2414 2398 2382 2366 
2350 2334 2318 2302 2286 2270 2254 2238  2206 2190 2174 2158 2142 2126 2110 
2094 2078 2062 2046 2030 2014 1998 1982 1966 1950 1934 1918 1902 1886 1870 1854 
1838 1822 1806 1790 1774 1758 1742 1726 1710 1694 1678 1662 1646 1630 1614 1598 
1582 1566 1550 1534 1518 1502 1486 1470 1454 1438 1422 1406 1390 1374 1358 1342 
1326 1310 1294 1278 1262 1246 1230 1214 1198 1182 1166 1150 1134 1118 1102 1086 
1070 1054 1038 1022 1006 990 974 958 942 926 910 894 878 862 846 830 814 798 
782 766 750 734 718 702 686 670 654 638 622 606 590 574 558 542 526 510 494 478 
462 446 430 414 398 382 366 350 334 318 302 286 270 254 238 222 206 190 174 158 
142 126 110 94 78 62 46 30 14

Reading symbols from /boot/kernel/umass.ko...Reading symbols from 
/boot/kernel/umass.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/umass.ko
#0  doadump () at pcpu.h:195
195 __asm __volatile("movq %%gs:0,%0" : "=r" (td));
(kgdb) bt
#0  doadump () at pcpu.h:195
#1  0x80567248 in boot (howto=260)
at /usr/home/nox/src72s2/src/sys/kern/kern_shutdown.c:418
#2  0x805676ac in panic (fmt=Variable "fmt" is not available.
)
at /usr/home/nox/src72s2/src/sys/kern/kern_shutdown.c:574
#3  0x8082f953 in trap_fatal (frame=0xc, eva=Variable "eva" is not 
available.
)
at /usr/home/nox/src72s2/src/sys/amd64/amd64/trap.c:756
#4  0x8082fd34 in trap_pfault (frame=0xff8085487cf0, usermode=0)
at /usr/home/nox/src72s2/src/sys/amd64/amd64/trap.c:672
#5  0x808306e2 in trap (frame=0xff8085487cf0)
at /usr/home/nox/src72s2/src/sys/amd64/amd64/trap.c:443
#6  0x80819cce in calltrap ()
at /usr/home/nox/src72s2/src/sys/amd64/amd64/exception.S:218
#7  0x804d67d4 in usb_transfer_complete (xfer=0xff00046b1000)
at /usr/home/nox/src72s2/src/sys/dev/usb/usbdi.c:949
#8  0x80815bf4 in bus_dmamap_load (dmat=0xff0004499880, 
map=0xff000478ec00, buf=0xff8085487fe0, buflen=0, 
callback=0x804d68b0 , 
callback_arg=0xff00046b1000, flags=0)
at /usr/home/nox/src72s2/src/sys/amd64/amd64/busdma_machdep.c:738
#9  0x804d6f2e in usbd_transfer (xfer=0xff00046b1000)
at /usr/home/nox/src72s2/src/sys/dev/usb/usbdi.c:312
#10 0x804d717f in usbd_do_request_flags_pipe (dev=0xff0004751600, 

Re: Value of $? lost in the beginning of a function.

2009-07-19 Thread Romain Tartière
On Sun, Jul 19, 2009 at 10:47:55PM +0200, Jilles Tjoelker wrote:
> This has been fixed in 8.x:
Cool, thanks!

-- 
Romain Tartière http://romain.blogreen.org/
pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)


pgpxLdItj8a71.pgp
Description: PGP signature


Re: Value of $? lost in the beginning of a function.

2009-07-19 Thread Glen Barber
2009/7/19 Romain Tartière :
> Hi Glen,
>
> On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote:
>> > % sh foo.sh
>> > % zsh foo.sh
>> > % bash foo.sh
>> What happens if you replace '#!/bin/sh' with '#!/usr/local/bin/zsh' ?
>
> This is not related to my problem since I am not running the script
> using ./foo.sh but directly using the proper shell.  sh just behaves
> differently, that looks odd so I would like to know if it is a bug in sh
> or if there is no specification for this and the behaviour depends of
> the implementation of each shell, in which case I have to tweak the
> script I am porting to avoid this construct (passing $? as an argument
> for example).
>
> Romain
>

My understanding was this:

If you specify 'sh foo.sh' at the shell, the script will be run in a
/bin/sh shell, _unless_ you override the shell _in_ the script.

Ie, 'sh foo.sh' containing '#!/bin/sh' being redundant, but 'zsh
foo.sh' containing '#!/bin/sh' would execute using zsh.


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


Re: Value of $? lost in the beginning of a function.

2009-07-19 Thread Jilles Tjoelker
On Sun, Jul 19, 2009 at 10:26:38PM +0200, Romain Tartière wrote:
> Hi!
> 
> Simple test case:
> 
> 8<--
> #!/bin/sh
> foo()
> {
>   echo "\$?=$? \$1=$1"
> }
> false
> foo $?
> 8<--
> 
> % sh foo.sh
> $?=0 $1=1
> % zsh foo.sh
> $?=1 $1=1
> % bash foo.sh
> $?=1 $1=1
> 
> As you can see, the value of $? is « lost » when FreeBSD sh enters a
> function.  Is this supposed to behave this way?

This has been fixed in 8.x:

Revision 185231 - Directory Listing
Modified Sun Nov 23 20:23:57 2008 UTC (7 months, 3 weeks ago) by stefanf

Fix $? at the first command of a function.  The previous exit status was saved
twice and thus lost.

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


Re: Value of $? lost in the beginning of a function.

2009-07-19 Thread Romain Tartière
Hi Glen,

On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote:
> > % sh foo.sh
> > % zsh foo.sh
> > % bash foo.sh
> What happens if you replace '#!/bin/sh' with '#!/usr/local/bin/zsh' ?

This is not related to my problem since I am not running the script
using ./foo.sh but directly using the proper shell.  sh just behaves
differently, that looks odd so I would like to know if it is a bug in sh
or if there is no specification for this and the behaviour depends of
the implementation of each shell, in which case I have to tweak the
script I am porting to avoid this construct (passing $? as an argument
for example).

Romain

-- 
Romain Tartière http://romain.blogreen.org/
pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)


pgplyJfhdQFNC.pgp
Description: PGP signature


Re: Value of $? lost in the beginning of a function.

2009-07-19 Thread Glen Barber
2009/7/19 Romain Tartière :
> Hi!
>
> Simple test case:
>
> 8<--
> #!/bin/sh
> foo()
> {
>  echo "\$?=$? \$1=$1"
> }
> false
> foo $?
> 8<--
>
> % sh foo.sh
> $?=0 $1=1
> % zsh foo.sh
> $?=1 $1=1
> % bash foo.sh
> $?=1 $1=1
>
> As you can see, the value of $? is « lost » when FreeBSD sh enters a
> function.  Is this supposed to behave this way?
>

Hi.

I'm no expert at shell scripting, but my first presumption is that
since you have '#!/bin/sh' at the beginning of the script, it is
creating a new subshell, and overwriting the value.  What happens if
you replace '#!/bin/sh' with '#!/usr/local/bin/zsh' ?

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


Value of $? lost in the beginning of a function.

2009-07-19 Thread Romain Tartière
Hi!

Simple test case:

8<--
#!/bin/sh
foo()
{
  echo "\$?=$? \$1=$1"
}
false
foo $?
8<--

% sh foo.sh
$?=0 $1=1
% zsh foo.sh
$?=1 $1=1
% bash foo.sh
$?=1 $1=1

As you can see, the value of $? is « lost » when FreeBSD sh enters a
function.  Is this supposed to behave this way?

Thanks,
Romain

-- 
Romain Tartière http://romain.blogreen.org/
pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)


pgp6HLk0w7zQx.pgp
Description: PGP signature


Re: HEADS-UP: Shared Library Versions bumped...

2009-07-19 Thread Thomas Backman

On Jul 19, 2009, at 20:16, Ken Smith wrote:

The problem is that as of the next time you update a machine that had
been running -current you are best off reinstalling all ports or other
applications you have on the machine.  When you reboot after doing the
update to the base system everything you have installed will still  
work

because the old shared library versions will still be there.  However
anything you build on the machine after its base system gets updated
would be linked against the newer base system shared libraries but any
libraries that are part of ports or other applications (e.g. the Xorg
libraries) would have been linked against the older library versions.
You really don't want to leave things that way.
So, to be clear: a fresh ports tree and "portupgrade -af" after  
building and installing r195767+ should be enough to solve any  
problems? (installkernel, installworld, reboot, portupgrade -af)


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


Re: HEADS-UP: Shared Library Versions bumped...

2009-07-19 Thread Ken Smith
On Sun, 2009-07-19 at 20:26 +0200, Thomas Backman wrote:
> On Jul 19, 2009, at 20:16, Ken Smith wrote:
> > The problem is that as of the next time you update a machine that had
> > been running -current you are best off reinstalling all ports or other
> > applications you have on the machine.  When you reboot after doing the
> > update to the base system everything you have installed will still  
> > work
> > because the old shared library versions will still be there.  However
> > anything you build on the machine after its base system gets updated
> > would be linked against the newer base system shared libraries but any
> > libraries that are part of ports or other applications (e.g. the Xorg
> > libraries) would have been linked against the older library versions.
> > You really don't want to leave things that way.
> So, to be clear: a fresh ports tree and "portupgrade -af" after  
> building and installing r195767+ should be enough to solve any  
> problems? (installkernel, installworld, reboot, portupgrade -af)
> 

Correct for those of you who let portupgrade do all the building for you
(which the example command you give does).  The reason I'm being careful
is portupgrade can also be told to fetch pre-built packages.  At the
moment that will not work, if you use that approach please hold off
until the ports folks let us know the packages have been rebuilt.

-- 
Ken Smith
- From there to here, from here to  |   kensm...@cse.buffalo.edu
  there, funny things are everywhere.   |
  - Theodore Geisel |


signature.asc
Description: This is a digitally signed message part


HEADS-UP: Shared Library Versions bumped...

2009-07-19 Thread Ken Smith

First I want to apologize.  This should have happened a bit sooner in
our release cycle than now.  To be honest I had slipped into "We have
symbol versioning for our libraries now" mode.  But only a few of the
libraries currently have that turned on and I sorta forgot we still need
to deal with all the shared libraries that do not have symbol versioning
enabled yet.  Sorry for the hassle this will cause.

Today with svn commit 195767 I bumped the version number of all
non-symbol-version-ed shared libraries in preparation for 8.0-REL.  We
do this just in case API/ABI changes occured in head between 7.0 and
now, it lets us provide the older library versions as "compatibility
library ports" in the ports tree.

The problem is that as of the next time you update a machine that had
been running -current you are best off reinstalling all ports or other
applications you have on the machine.  When you reboot after doing the
update to the base system everything you have installed will still work
because the old shared library versions will still be there.  However
anything you build on the machine after its base system gets updated
would be linked against the newer base system shared libraries but any
libraries that are part of ports or other applications (e.g. the Xorg
libraries) would have been linked against the older library versions.
You really don't want to leave things that way.

The ports folks will be starting up a fresh package build now but it
takes some time for full package runs like this to complete, get
uploaded, and then propagate out to the mirrors.  If you tend to use
pre-built packages instead of building them as ports yourself you might
want to just hold off on updating anything until they let us know a
fresh set of packages is available.  And BETA3 will definitely be
scheduled for after the fresh set of packages becomes available.

And again - sorry for the hassle.

-- 
Ken Smith
- From there to here, from here to  |   kensm...@cse.buffalo.edu
  there, funny things are everywhere.   |
  - Theodore Geisel |


signature.asc
Description: This is a digitally signed message part


twa (3ware 9690SA) error on shutdown

2009-07-19 Thread Maxim Khitrov
I'm playing around with the 3ware 9690SA raid controller. At first, I
was using FreeBSD 8.0-BETA2, but it kept encountering errors after
start-up and on shutdown. There is no 8.x driver on the 3ware site, so
I decided to go back to 7.2-RELEASE. This, however, did not solve the
problem. The major one that I'm having right now is that the system
refuses to reboot. After issuing the command, this is what I see
toward the end:

Uptime: 9h41m43s
twa0: ERROR: (0x15: 0x1104): Internal request timed out: request =
0xfffe80223a28
twa0: INFO: (0x16: 0x1108): Resetting Controller...:
twa0: INFO: (0x04: 0x0001): Controller reset occurred: resets=1
twa0: INFO: (0x16: 0x1107): Controller reset done!:
twa0: ERROR: (0x15: 0x1015): Can't close connection with controller: error = 60
twa0: ERROR: (0x05: 0x2015): Failed to shutdown Common
Layer/controller: error = 60

Here the system freezes and I have to hold the power button for 5 sec
to turn the power off and then restart. This happened with the default
twa driver, so I downloaded the 9.5.2 code set from 3ware website and
tried to use the twa.ko that comes with that release (for amd64). This
also did not fix the problem.

There is one other issue that may be related to this one. The verify
process for a newly created array is never finished. When the system
is started, I see a "verify started" message and the activity leds of
the drivers connected to the controller light up. If I reboot the
system at this point, the first problem does not occur. On other hand,
if I wait maybe 5 minutes the activity lights turn off, indicating
that something happens to the verify process, and at this point I can
no longer reboot the system.

My guess is that the verify process causes some sort of a problem for
the driver or the controller itself, which then prevents normal
communication during shutdown. Has anyone else encountered this
problem or has a solution for it?

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