Linux-Development-Sys Digest #66, Volume #8 Sat, 5 Aug 00 00:13:14 EDT
Contents:
Re: a problem for calling pthread_create ("charity")
Re: Can't get a framebuffer console ([EMAIL PROTECTED])
Re: newbie question -- packet loss ("charity")
Re: read() and directories ([EMAIL PROTECTED])
Re: read() and directories (Alexander Viro)
Re: Intel OR840 Hang ("D. Stimits")
Re: SMP ("D. Stimits")
Kernel Panic - SCSI not syncing? (Bakki Kudva)
Re: "Need Program For PAL- 16L8 & EPROM 2764" (Bob Hauck)
Re: Using JNI on Linux (Mahendra A Ramachandran)
Re: Kernel Panic - SCSI not syncing? (Dave Platt)
Re: Time interval command for the kernel side (Robert Redelmeier)
Re: Using JNI on Linux (Jim Sculley)
----------------------------------------------------------------------------
From: "charity" <[EMAIL PROTECTED]>
Subject: Re: a problem for calling pthread_create
Date: Fri, 4 Aug 2000 16:02:53 +0800
when you compile your program,please add -lpthread,such as
cc test.c -lpthread
Terry <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> pthread_t tid;
> pthread_create(&tid, NULL, echo_serv, &newsockfd);
>
> where the prototype for the thread start function is:
> void *echo_serv(void *sockfd);
>
> When I compile, the following message appears:
> undefined reference to `pthread_create'
>
> What is wrong with the above code??
> Would anyone tell me ??
>
> Thx,
> Terry
>
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.embedded
Subject: Re: Can't get a framebuffer console
Date: Fri, 04 Aug 2000 23:07:02 GMT
On Thu, 03 Aug 2000 17:00:11 -0700 Nikhil G. Daddikar <[EMAIL PROTECTED]> wrote:
| I am using the IBM 405GP (PowePC) board and running 2.4 version of
| linux. I have a matrox card and was able to get the framebuffer working.
| When linux boots up, I see the message "Console: switching to
| framebuffer..." but I don't see anything on the monitor. The console
| device is still the serial port. I don't quite understand how this all
| works so any pointers would be helpful.
Show your work.
Show the /etc/lilo.conf file where you set the video mode and append string.
--
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil (at) ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]
------------------------------
From: "charity" <[EMAIL PROTECTED]>
Subject: Re: newbie question -- packet loss
Date: Fri, 4 Aug 2000 16:05:17 +0800
should be CRC not correct.
You can get some net monitor software on net.
<[EMAIL PROTECTED]> wrote in message news:8mce0d$6kh$[EMAIL PROTECTED]...
> If there any way to find out that a packet was discarded for
> whatever reason. I'm sending a icmp "echo request" (from ping) to
> an "eth "interface but the "echo reply" is never sent back. I see the
> "echo request" using tcpdump and the ICMP/IP packet looks fine but
> the packet gets "lost" or something is happening where the reply is
> never sent.
>
>
>
> Thanks for any help.
>
> Chip
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: read() and directories
Date: Fri, 04 Aug 2000 23:16:38 GMT
On 03 Aug 2000 18:23:05 -0400 Daniel P. Katz <[EMAIL PROTECTED]> wrote:
| [EMAIL PROTECTED] (Alexander Viro) writes:
|
|> Not. Just that layout is fs-dependent and everyone got _very_
|> seriously burnt back in '84 when everything and its mom got b0rken
|> by switch to FFS - programs assumed that they could read() directory
|> and use the result. Major breakage followed and it took years to
|> fix. Nobody wants that kind of shit again, especially considering
|> the current average clue and cultural background of people writing
|> under Linux (too many DOS buffs with no friggin' idea of portablitiy
|> got injected into the culture).
|
| I don't quite follow this. I mean, I understand the problem of people
| doing silly low level coding when they ought to be using a higher
| level abstraction, but actively forbidding people to *see* how
| something is physically implemented seems an extreme response. I
| guess I just find the notion of a "completely undumpable" file to be
| very un-UNIX-ish; I would think that the ability to see what bits a
| file is made of is rather fundamental.
A directory may not even be sequential. So, there is no requirement that
a filesystem in VFS has to support reading sequentially. Given that, why
bother, since it provides nothing useful and the truly curious can look
at the filesystem specifications (docs and source) to see how it really
is organized. If you want to diagnose a directory, then you need to be
looking at the filesystem's raw device.
| I agree that basic utilities should not be subject to creeping
| featurism if at all possible, but in this case it would be restoring
| part of od's original functionality. :-)
|
| Seriously, though, there must be *some* way to examine a directory's
| basic internal structure. The notion of "unreadable bits" gives me
| the creeps.
df . | awk '{if(NR==2){print "od -x <",$1;}}' | sh
--
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil (at) ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: read() and directories
Date: 4 Aug 2000 19:24:20 -0400
In article <[EMAIL PROTECTED]>,
Daniel P. Katz <[EMAIL PROTECTED]> wrote:
>I don't quite follow this. I mean, I understand the problem of people
>doing silly low level coding when they ought to be using a higher
>level abstraction, but actively forbidding people to *see* how
>something is physically implemented seems an extreme response. I
>guess I just find the notion of a "completely undumpable" file to be
>very un-UNIX-ish; I would think that the ability to see what bits a
>file is made of is rather fundamental.
What's wrong with debugfs? Yes, fs-specific, indeed, but so is the data
you are asking for.
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
Date: Fri, 04 Aug 2000 17:33:43 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Intel OR840 Hang
Tor Arntsen wrote:
>
> "D. Stimits" <[EMAIL PROTECTED]> writes:
> >Check /var/log/messages for "unexpected IO-APIC". If that appears, boot
> >with kernel option "noapic" (interrupts will be different after that,
> >and performance during high load will drop). Assuming you have
> >"unexpected IO-APIC", the drive access is only a symptom, and
> >mounting/umounting frequently from any controller or filesystem will
> >cause this (try a cd rom several times real fast). With unexpected APIC,
> >it can vector an IRQ to an invalid location (search the log for
> >"unexpected IRQ vector 217"). SuperMicro i840 boards have this problem,
> >I don't know what other i840's have it (it seems the manner of
> >connecting the APIC can make it successful or failure). If you don't
> >have the APIC message, ignore it...if you do, check the Documentation
> >subdir of the kernel source for file IO-APIC.txt for more info.
>
> Thanks a lot for these suggestions. At the current moment I can't
> boot and check the log (my monitor is away) but what you describe
> looks very similar to what I see (it doesn't matter if I replace
> the scsi with IDE etc.).
>
> Thanks,
> -Tor
I'll be interested to know what turns up once you get the monitor. I'm
looking for alternatives to SuperMicro i840 boards, since there are
probably a few out there that do have the chipset APIC connected
correctly.
------------------------------
Date: Fri, 04 Aug 2000 17:37:56 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: SMP
Gary James wrote:
>
> I am attempting to recompile my driver (simple kernel mode driver) for SMP.
> (2.2.12-20 linux red hat 6.1) The driver compiles fine, however when I
> insmod the
> driver, insmod tells me that it can't resolve certain functions. These
> functions are the
> "standard" kernel calls for such things as copy_from_user, printk, and
> pci.....
>
> This should be simple - I was hoping to be debugging locks and such by now,
> but I need the magic incantation that lets me in.
>
> Any ideas?
>
> (both with and without -D__SMP__ in the compile line have been tried)
If your module is compiled at a time when the kernel source tree exactly
matches the configuration of the kernel to be used, and you also copy
the System.map from the kernel source tree to /boot/System.map
(actually, there are a few search locations, this is just a better spot
among them, plus versioning variations can be added to the name), it
should work. If you have changed something in the configuration, and did
not reinstall the kernel, or System.map, then the symbols from the new
module will be wrong.
------------------------------
From: [EMAIL PROTECTED] (Bakki Kudva)
Subject: Kernel Panic - SCSI not syncing?
Date: Sat, 05 Aug 2000 00:11:40 GMT
It started some time back with this error at the login prompt.
manx login: SCSI0 Tagged Queing now active for Target 2.
Recently the machine would randomly lock up which I thought initially was
the jdk in Netscape. Then I got ..
SCSI host0 abort (pid 368471) timed out.
Resetting Buslogic BT958 due to target1
SCSI bus is being reset for host 0 channel 0
Now after a couple of false starts and aborted fsck with...
Kernel Panic: SCSI_free: Trying to free unused memory
in Interrupt handler - not syncing.
and so the machine now doesn't boot and the primary partition is probably
hosed due to all kinds of bad inodes by now.
Can some one shed some light on this and help me diagnose this to
determine if this has an origin in bad hardware or is it a case of
corrupted software.
Also any pointers to SCSI diagnostic utilities to test/troubleshoot the
SCSI bus will also be greatly appreciated.
-bakki
bakki kudva
------------------------------
From: [EMAIL PROTECTED] (Bob Hauck)
Subject: Re: "Need Program For PAL- 16L8 & EPROM 2764"
Reply-To: bobh{at}haucks{dot}org
Date: Sat, 05 Aug 2000 00:43:40 GMT
On Fri, 04 Aug 2000 07:30:04 GMT, wilfred <[EMAIL PROTECTED]> wrote:
>I'm currently doing my final year project on 68k microprocessor while
>in the installation process of hardware i lack of program that needed
>to burn in the PAL & EPROM.
The program and the programmer hardware usually either go together or
else you can use any terminal program. IOW, you need to tell us what
programmer you have. Some of them can use any terminal program and
accept code uploads by zmodem or whatever, while others require some
special software that is usually only available for DOS or Windows.
Many of the DOS ones will work in DOSEMU if you set it up right.
If you mean that you also need to buy a programmer, maybe someone can
give suggestions. The company I work for uses DataIO, but they're
a bit high-end (i.e. expensive) for a final year project. I haven't
bought a small one in years.
BTW, another way of doing this is to use flash memory for your ROM.
Then write a little loader program that runs from RAM. Download that
to the system via the debugger and use it to program the flash. Modern
flash parts are pretty straightforward to program this way.
--
-| Bob Hauck
-| To Whom You Are Speaking
-| http://www.haucks.org/
------------------------------
From: [EMAIL PROTECTED] (Mahendra A Ramachandran)
Crossposted-To: comp.lang.java.programmer,comp.lang.java.help
Subject: Re: Using JNI on Linux
Date: 5 Aug 2000 00:35:06 GMT
>>"Michael M. Welch" wrote:
>>>
>>> I have a Java Native Interface implementation that has been
>>> running on Solaris that I now need to run on Linux. However, I
>>> am new to using Linux and am running into trouble. The native
>>> code is compiled into a shared library that the Java code loads
>>> to access the native functions. Like I said, I got this going
>>> just fine on Solaris but I can't get it working when I recompile
>>> the native source on Linux. Are there any gotchas with regard
>>> to creating shared libraries in Linux that may be obvious to
>>> more seasoned users but maybe not so obvious to me?
>>>
>>> I created the library according to the steps given in Java
>>> Tip 23 at javaworld.com but no dice. When I try to run the Java
>>> program, the result is an UnsatisfiedLinkError when the Java
>>> program attempts to load the library. (Yes, I did remember to
>>> appropriately set my LD_LIBRARY_PATH and I have double-, triple-
>>> and quadruple-checked it.)
>>>
>>> I'm missing something REALLY simple here, aren't I?
>>>
>>> - Michael
>
> One thing I did notice in doing this though is that unlike on
>Solaris, when I'm on Linux the LD_LIBRARY_PATH seems to apply only
>at run-time and not at link-time. On Solaris, when I compile and
>link Test.cxx, I don't have to pass -L. to g++ if LD_LIBRARY_PATH
>includes the current directory. But on Linux, I must always link
>with -L. regardless of the LD_LIBRARY_PATH setting. I don't see
>how this explains my JNI problem since that's occurring at run-time,
>but I'm wondering if this difference between the O/S's might be
>somehow related to my problem.
>
Michael,
Are you using C or C++ to write your native functions? I have used
ld -G -dy -o libmyfuncs.so *.o to create my shared lib if I use C and
g++ -shared -lstdc++ -o libmyfuncs.so *.o if I use C++.
Mahendra
------------------------------
From: [EMAIL PROTECTED] (Dave Platt)
Subject: Re: Kernel Panic - SCSI not syncing?
Date: Sat, 05 Aug 2000 00:42:48 GMT
In article <[EMAIL PROTECTED]>,
Bakki Kudva <[EMAIL PROTECTED]> wrote:
>It started some time back with this error at the login prompt.
>
>manx login: SCSI0 Tagged Queing now active for Target 2.
That isn't really an error. That's the SCSI driver telling you that
it has enabled SCSI tagged queueing for device #2 on your SCSI bus.
This message may show up after a SCSI reset, or the first time you
access a SCSI device after boot.
>Recently the machine would randomly lock up which I thought initially was
>the jdk in Netscape. Then I got ..
>
>SCSI host0 abort (pid 368471) timed out.
>Resetting Buslogic BT958 due to target1
>SCSI bus is being reset for host 0 channel 0
This might indicate any of several bad things.
Your SCSI device #1 may itself be bad.
You may have a cabling or termination problem on your SCSI bus. Make
sure you're using a high-quality SCSI cable, and that your devices are
properly terminated. Use active (regulated) termination wherever
possible.
You may have a device on the bus which does implement SCSI tagged
queueing, but does so badly. I've run into a number of devices with
tagged-queueing bugs. Some devices say that they handle tagged
queueing, but will hang if you actually send them a command with the
tag feature (had this problem with a Ricoh MP6201S CD-RW drive).
Other devices handle tagged queueing well enough as long as you don't
try to queue up more than a modest number of commands... if you send
too many tagged commands, and overflow their queue, they hang (had
this problem with a Quantum hard drive).
If you do have a tagged-queueing problem, it would tend to show up as
a hang, crash, or data corruption during times of extremely intense
disk activity. In particular, if you do a big compilation, or
something else which "touches" a lot of blocks on disk, you might find
the system freezing up or panicing or doing SCSI resets when the
kernel tries to flush large numbers of "dirty" blocks out to disk.
The BusLogic SCSI driver is rather aggressive about enabling SCSI
tagged command queueing. Fortunately, it's pretty good about letting
you control the driver options at boot time. You'd need to add an
option to your kernel boot parameters (typically via LILO).
Specifically, you'd say something like
LILO: vmlinux BusLogic=QueueDepth:4;TaggedQueueing:XXN
This would tell the driver to limit the maximum tagged-queue depth to
4 entries (that is, it will send no more than 4 tagged commands to any
given SCSI device, and will wait for one of them to complete before
sending a fifth, and so forth). This will also tell the driver to
_not_ use tagged queueing for SCSI device #2 on the first controller
(the "N"); tagged queueing may still be used on devices 0 and 1 if
the devices say they're capable of it.
See /usr/src/linux/drivers/scsi/README.BusLogic for further details.
--
Dave Platt [EMAIL PROTECTED]
Visit the Jade Warrior home page: http://www.radagast.org/jade-warrior/
I do _not_ wish to receive unsolicited commercial email, and I will
boycott any company which has the gall to send me such ads!
------------------------------
From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: Time interval command for the kernel side
Date: Fri, 04 Aug 2000 20:04:08 -0500
Rob Morris wrote:
>
> We are instrumenting the kernel to get an idle profile of the number of
> times the modules are called within a given set of time. Was wondering if
> there is any KERNEL or USER side commands for making time stamps that
Several things. Easiest is the RDTSC instruction that reads the
[Pentium MMX+] internal CPU cycle counter. Very high resolution,
but dependant on CPU speed. OS independant, it's an asm instruction.
In Linux, and most other Unixen, you can read `jiffies`, the count of
clock ticks [10 ms on x86, 1 ms on Alpha].
-- Robert
------------------------------
Date: Fri, 04 Aug 2000 23:31:39 -0400
From: Jim Sculley <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.java.programmer,comp.lang.java.help
Subject: Re: Using JNI on Linux
"Michael M. Welch" wrote:
>
> One thing I did notice in doing this though is that unlike on
> Solaris, when I'm on Linux the LD_LIBRARY_PATH seems to apply only
> at run-time and not at link-time. On Solaris, when I compile and
> link Test.cxx, I don't have to pass -L. to g++ if LD_LIBRARY_PATH
> includes the current directory. But on Linux, I must always link
> with -L. regardless of the LD_LIBRARY_PATH setting. I don't see
> how this explains my JNI problem since that's occurring at run-time,
> but I'm wondering if this difference between the O/S's might be
> somehow related to my problem.
Three suggestions:
A. Run this simple app, just to be sure where the VM is looking for
shared libraries:
public class PropTest {
public static void main (String[] args) {
System.out.println(System.getProperty("java.library.path"));
}
}
B. I'm not familiar with what tool you need, but dump the contents of
the shared library and make sure the exported function names aren't
mangled. They should look just like the function declarations, with an
@xx on the end, where 'xx' represents the total number of bytes needed
to represent the passed in arguments.
C. Are you by any chance using packages? If so, the function
declarations in the native code need to reflect that fact:
JNIEXPORT void JNICALL Java_mypackage_MyClass_myMethod(.....)
Jim S.
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************