This came up a few weeks ago; one of the Blackdown team members
indicated it'll be fixed in the next release. No indication of a target
date, though. For that matter, no indication of whether this meant JDK
release or kernel release :-O.
Nathan
On 30 Oct, Greg Wolodkin wrote:
> Hi all -
> After upgrading my Linux kernel from 2.2.12 to 2.2.13, Java JNI
> examples fail to load the virtual machine *if* the process number
> is below 10000.
>
> I'm not sure whether or not this is a bug in the 2.2.13 kernel, or a
> bug in the Blackdown JDK (1.1.7 v1a,v3), but the error I see when
> starting the VM is "Cannot open /proc/09640 for GC" where 9640 is the
> process ID of the guy who's trying to start the VM.
>
> A simpler C program which reliably illustrates the same behavior is this:
>
> #include <stdio.h>
> void main(void) { if (fopen("/proc/00001","r") == NULL) printf("Oops.\n"); }
>
> where in 2.2.12 and before, /proc/00001 would map to /proc/1. In
> 2.2.13 that's no longer true.
>
> Backing out these two patches (below) fixes the problem, but I'm
> wondering where the bug is (kernel or JDK) and what is the right fix?
> The 1.2 JDK from Blackdown doesn't seem to have this problem, so
> maybe the correct answer is a bug in the 1.1.7 JDK? A quick scan of
> the proc man page didn't reveal any details as to whether or not I
> should be able to open /proc/00001 instead of /proc/1.
>
> Either way, I hope this simple example helps -- Thanks!
> Greg
>
> diff -u --recursive --new-file v2.2.12/linux/fs/proc/fd.c linux/fs/proc/fd.c
> --- v2.2.12/linux/fs/proc/fd.c Fri Apr 23 21:20:38 1999
> +++ linux/fs/proc/fd.c Tue Oct 19 17:14:02 1999
> @@ -87,6 +87,7 @@
> fd = 0;
> len = dentry->d_name.len;
> name = dentry->d_name.name;
> + if (len > 1 && *name == '0') goto out;
> while (len-- > 0) {
> c = *name - '0';
> name++;
> diff -u --recursive --new-file v2.2.12/linux/fs/proc/root.c linux/fs/proc/root.c
> --- v2.2.12/linux/fs/proc/root.c Mon Aug 9 16:05:57 1999
> +++ linux/fs/proc/root.c Tue Oct 19 17:14:02 1999
> @@ -845,6 +845,7 @@
> }
> pid *= 10;
> pid += c;
> + if (!pid) break;
> if (pid & 0xffff0000) {
> pid = 0;
> break;
>
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]