pthreads & fork & execve

2001-04-01 Thread Dennis Noordsij

Hi,

I have question regarding use of pthreads, forks and execve's which appears 
to not work very well :-) First let me explain the reasoning though

We have an app that launches a few other apps and keeps track of their 
status, resource consumption etc. If one of the apps crashes, it is restarted 
according to certain parameters.

The app uses pthreads, and it's method of (re)starting an application is 
forking and calling execve. 

It works fine for all-but-one other app, which core dumps when started this 
way (from the commandline it works fine) and the core only traces back to  
int main(int argc, char **argv). It uses both pthreads and -ldl for plugin 
handling. 

We have tried changing the linking order (i.e. -ldl -lpthread, -lpthread, 
-ldl, etc), and even execv'ing a shell script that starts a shell script that 
starts the app - result is the same, instant core without even running.

I can see who forks together with threads and execve's are a messy 
combination, and a better solution altogether to our approach is appreciated 
just as much as a way to make the current solution work :-)

We have tested both kernels 2.4.2 and 2.2.18. 

We have tried on different systems, different hardware and slightly different 
distributions (debian potato, unstable, etc).

To sum up: using a pthreaded app to launch another pthreaded app by means of 
forking and exec(ve)'ng makes the second app core immediately, (at entering 
main). What to do?

Kind regards, and thanks for any help
Dennis Noordsij
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: menuconfig snafu?

2001-03-28 Thread Dennis Noordsij

On Wednesday 28 March 2001 22:17, Dennis wrote:
> its seems that "make menuconfig" only allows you to select 1 processor
> type. it seems impossible that you cant build a generic kernel that
> supports different processors. Its this just a menuconfig bug?
>
> Dennis

You pick the lowest common denominator. If you want a kernel that runs 
everywhere (x86 arch), pick the plain old 386.

Or, read the menuconfig help :-)

CONFIG_M386:
This is the processor type of your CPU. This information is used for 
optimizing purposes. In order to compile a kernel that can run on all x86 CPU 
types (albeit not optimally fast), you can specify "386" here.
   
The kernel will not necessarily run on earlier architectures than the one you 
have chosen, e.g. a Pentium optimized kernel will run on a PPro, but not 
necessarily on a i486.


Regards,
also Dennis :-)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



APM battery status reporting

2001-03-09 Thread Dennis Noordsij

Hi,

I have a Dell Inspiron 5000e laptop which works beautifully with 2.4.2, 
including suspends, DRM, etc etc.

One thing that has never worked though is battery status reporting 
(/proc/apm). However people who sell this exact same laptop with Linux 
preinstalled (mostly redhat though with their patched kernel, I use Debian 
with stock kernel) tell me their battery status reporting does indeed work. 
Via google.com/linux I have found several older posts in this list (Q4 2000) 
mentioning this exact laptop and patches that do enable this feature being 
tested in previous kernels. Then again my dmesg says the BIOS is probably 
buggy (same BIOS though as mentioned in those posts). Apmd does notice the 
change from mains to battery and vice versa (I have disabled Speedstep so now 
everything actually survives this transition :-).

So to end all the confusion, is there a patch out there that enables battery 
status reporting for me (and other Dell owners :-) ?

Thanks in advance for any pointers,
Kind regards,
Dennis Noordsij

dmesg:

BIOS strings suggest APM bugs, disabling power status reporting.
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.14)


kernel configuration:

CONFIG_APM=y
CONFIG_APM_IGNORE_USER_SUSPEND=y
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
CONFIG_APM_RTC_IS_GMT=y
CONFIG_APM_ALLOW_INTS=y
CONFIG_APM_REAL_MODE_POWER_OFF=y

# CONFIG_ACPI is not set


/proc/apm:

1.14 1.2 0x03 0xff 0xff 0xff -1% -1 ?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Unexpected IRQ trap at vector 20

2001-02-27 Thread Dennis Noordsij

Hi,

After a previous post about a Dell 5000e Inspiron crashing when Speedstep 
kicks in I have set up a serial console, and this time, when copying a file 
between partitions, in plain old console, no X, network not configured, etc 
etc, plugging in the power (while the system was running on battery - this 
causes the CPU to step up to 700MHz from 550MHz) causes the system to freeze 
in every way (including SysRq), while continuously spitting out "Unexpected 
IRQ trap at vector 20" on the serial console. 

I realize that probably more information is needed for this to be useful (if 
it is not just a 'shitty hardware' thing) but I am not sure what would be 
needed, so if you need to know anything, just drop me a line.

Kind regards,
Dennis Noordsij

Linux version 2.4.2 (root@dennis) (gcc version 2.95.3 20010219 (prerelease)) 
#10 Tue Feb 27 18:51:54 EET 2001
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 8
model name  : Pentium III (Coppermine)
stepping: 3
cpu MHz : 696.977
cache size  : 256 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 2
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov 
pat pse36 mmx fxsr sse
bogomips: 1389.36

   CPU0   
  0: 354204  XT-PIC  timer
  1:  20736  XT-PIC  keyboard
  2:  0  XT-PIC  cascade
  5:  0  XT-PIC  ESS Maestro 2E
 11:  33195  XT-PIC  Texas Instruments PCI1225, Texas Instruments 
PCI1225 (#2), eth0
 12:  59885  XT-PIC  PS/2 Mouse
 14:  76934  XT-PIC  ide0
 15: 20  XT-PIC  ide1
NMI:  0 
ERR:193

Character devices:
  1 mem
  2 pty
  3 ttyp
  4 ttyS
  5 cua
  7 vcs
 10 misc
 14 sound
 21 sg
108 ppp
128 ptm
136 pts
162 raw
254 pcmcia

Block devices:
  2 fd
  3 ide0
  7 loop
 11 sr
 22 ide1

-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
0280-0287 : serial(set)
0376-0376 : ide1
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(set)
0cf8-0cff : PCI conf1
1000-103f : Intel Corporation 82371AB PIIX4 ACPI
1040-105f : Intel Corporation 82371AB PIIX4 ACPI
1060-107f : Intel Corporation 82371AB PIIX4 USB
1080-108f : Intel Corporation 82371AB PIIX4 IDE
  1080-1087 : ide0
  1088-108f : ide1
1400-14ff : ESS Technology ES1978 Maestro 2E
  1400-14ff : ESS Maestro 2E
1800-18ff : PCI CardBus #02
  1800-187f : PCI device 115d:0003
1800-187f : eth0
  1880-1887 : PCI device 115d:0103
1880-1887 : serial(auto)
1c00-1cff : PCI CardBus #02
2000-2fff : PCI Bus #01
  2000-20ff : ATI Technologies Inc Mobility M3 AGP 2x
3000-30ff : PCI CardBus #06
3400-34ff : PCI CardBus #06

PCI devices found:
  Bus  0, device   0, function  0:
Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (rev 3).
  Master Capable.  Latency=64.  
  Prefetchable 32 bit memory at 0xe000 [0xe3ff].
  Bus  0, device   1, function  0:
PCI bridge: Intel Corporation 440BX/ZX - 82443BX/ZX AGP bridge (rev 3).
  Master Capable.  Latency=128.  Min Gnt=140.
  Bus  0, device   4, function  0:
CardBus bridge: Texas Instruments PCI1225 (rev 1).
  IRQ 11.
  Master Capable.  Latency=168.  Max Lat=5.
  Non-prefetchable 32 bit memory at 0x1000 [0x1fff].
  Bus  0, device   4, function  1:
CardBus bridge: Texas Instruments PCI1225 (#2) (rev 1).
  IRQ 11.
  Master Capable.  Latency=168.  Min Gnt=192.Max Lat=5.
  Non-prefetchable 32 bit memory at 0x10001000 [0x10001fff].
  Bus  0, device   7, function  0:
Bridge: Intel Corporation 82371AB PIIX4 ISA (rev 2).
  Bus  0, device   7, function  1:
IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 1).
  Master Capable.  Latency=64.  
  I/O at 0x1080 [0x108f].
  Bus  0, device   7, function  2:
USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 1).
  IRQ 5.
  Master Capable.  Latency=64.  
  I/O at 0x1060 [0x107f].
  Bus  0, device   7, function  3:
Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 3).
  Bus  0, device   8, function  0:
Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 16).
  IRQ 5.
  Master Capable.  Latency=64.  Min Gnt=2.Max Lat=24.
  I/O at 0x1400 [0x14ff].
  Bus  1, device   0, function  0:
VGA compatible controller: ATI Technologies Inc Mobility M3 AGP 2x (rev 
2).
  IRQ 11.
  Master Capable.  Latency=66.  Min Gnt=8.
  Prefetchable 32 bit memory at 0xf800 [0xfbff].
  I/O at 0x2000 [0x20ff].
  Non-prefetchable 32 bit memory at 0xf400 [0xf4003fff].
  Bus  2, device   0, function  0:
Ethernet controller: PCI device 115d:0003 (rev 3).
  IRQ 11.
  Master Capabl

Dell Inspiron 5000e Speedstep Oops

2001-02-26 Thread Dennis Noordsij

Dear list,

I have a problem with an otherwise wonderful Dell 5000e Inspiron laptop, 
which didn't exist prior to kernel 2.4.0 (I used 2.4.0-pre10 for a long time, 
no problems).

The CPU is a Coppermine P3 with speedstep, switching to 550MHz when running 
on battery only, and 700MHz when connected to mains.

When I initially got this laptop I read some older posts on this list saying 
that the speedstep thing is not a problem (anymore). However, lately, when 
either pulling out the power (for example when I am packing up, the system is 
running shutdown scripts, I pull out the mouse, network, and then power) the 
system suddenly starts oopsing, scrolling them across the screen as fast as 
it can. It also happens when I am for example running on battery and the Dell 
beeps to indicate low battery power and I plug in the power.

The symptoms are Oopses scrolling across the screen, no way to stop, freeze, 
SysRq, copy or log them, apart from probably a serial console.

I would love to ksymoops the output for everyone, but perhaps it is a known 
issue and it is not necessary. If this is really not supposed to happen, I 
can try the setup with a serial console and log the Oopses. (just a bit of 
hassle because I am at work :-) 

Btw, the originally installed W2K not only detects the speed change, but also 
allows you to override the thing and run 700MHz on battery, or 550MHz on 
mains. I seem to remember from the older posts on this list though that it is 
difficult to detect this change (would require an ineffecient polling 
behaviour). Is this possible under Linux?

Below is some system information,
Thanks for any help,
Dennis Noordsij

PS - Occasionally (I think when using the network, Tulip Cardbus using kernel 
drivers) I get a hard freeze, screen freezes, mouse freezes, SysRq doesn't 
work, only way out is to pull out the power and battery. Nothing in the logs 
afterwards. What can cause that? I would love to help out and debug Oopses 
and whatnot, but how do you debug something like that?


/proc/version:
 
Linux version 2.4.2 (root@dennis) (gcc version 2.95.2 2220 (Debian 
GNU/Linux)) #2 Mon Feb 26 16:35:35 EET 2001


/proc/cpuinfo: 

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 8
model name  : Pentium III (Coppermine)
stepping: 3
cpu MHz : 696.977
cache size  : 256 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 2
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov 
pat pse36 mmx fxsr sse
bogomips: 1389.36

NOTE: When the system is booted while running on battery only, the speed is 
reported as something like 549.x MHz, with about 1000 bogomips.



/proc/meminfo:

total:used:free:  shared: buffers:  cached:
Mem:  129736704 94064640 356720640  4128768 43266048
Swap: 2554593280 255459328
MemTotal:   126696 kB
MemFree: 34836 kB
MemShared:   0 kB
Buffers:  4032 kB
Cached:  42252 kB
Active:  18080 kB
Inact_dirty: 28204 kB
Inact_clean: 0 kB
Inact_target:   44 kB
HighTotal:   0 kB
HighFree:0 kB
LowTotal:   126696 kB
LowFree: 34836 kB
SwapTotal:  249472 kB
SwapFree:   249472 kB


CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
CONFIG_APM_CPU_IDLE=y
# CONFIG_APM_DISPLAY_BLANK is not set
CONFIG_APM_RTC_IS_GMT=y
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Framebuffer orientation

2000-11-21 Thread Dennis Noordsij

Hi,

Is there any way to use the framebuffer on the i386 architecture in a 
'portrait' way? I am using a QBE web tablet and it favours the screen in that 
position. (768x1024).

I know X can do it for a few videocards, but not this one :-)


Regards,
Dennis
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/