Installation of Oracle10g Express Edition on FreeBSD
5.4-RELEASE
Dmitry Ganenko
dima at apk-inform.com
Mon Jun 26 10:33:48 UTC 2006
Saturday, June 24, 2006, 2:09:51 PM, you wrote:
DR> pls, can you explain how this manifest in the oracle? I agree that this is a
DR> bug but I am not sure why noone noticed this. the fact is that most people use
DR> "cat /proc/x/y" and cat reads 1024 bytes in this case so this doesnt manifest
Oracle XE does not start without this patch. I see in trace file that oracle
process enumerates all running processes (/compat/linux/proc/<pid>/cmdline)
with call of read(fd, buf, 8) and read() returns it 7 bytes, and
oracle do it while file descriptors available. After reaching maxfilesperproc,
oracle exit with "single instance violation error".
>> File patch3
>>
>> --- fs/pseudofs/pseudofs_vnops.c.orig Mon Sep 6 22:38:01 2004
>> +++ fs/pseudofs/pseudofs_vnops.c Wed Jun 21 11:14:14 2006
>> @@ -530,7 +530,7 @@ pfs_read(struct vop_read_args *va)
>> PRELE(proc);
>> PFS_RETURN (EIO);
>> }
>> - sb = sbuf_new(sb, NULL, buflen, 0);
>> + sb = sbuf_new(sb, NULL, buflen+1, 0);
>> if (sb == NULL) {
>> if (proc != NULL)
>> PRELE(proc);
DR> this is wrong...
DR> what about this:
DR> Index: pseudofs_vnops.c
DR> ===================================================================
DR> RCS file: /home/ncvs/src/sys/fs/pseudofs/pseudofs_vnops.c,v
DR> retrieving revision 1.59
DR> diff -u -r1.59 pseudofs_vnops.c
DR> --- pseudofs_vnops.c 22 Feb 2006 18:57:49 -0000 1.59
DR> +++ pseudofs_vnops.c 24 Jun 2006 11:08:59 -0000
DR> @@ -515,7 +515,7 @@
DR> if (uio->uio_offset < 0 || uio->uio_resid < 0 ||
DR> (offset = uio->uio_offset) != uio->uio_offset ||
DR> (resid = uio->uio_resid) != uio->uio_resid ||
DR> - (buflen = offset + resid) < offset || buflen > INT_MAX) {
DR> + (buflen = offset + resid + 1) < offset || buflen > INT_MAX) {
DR> if (proc != NULL)
DR> PRELE(proc);
DR> PFS_RETURN (EINVAL);
Thanks for correction. I'm from beginning said that may be I'm not
right. :)
WBR,
Dmitry Ganenko.
More information about the freebsd-emulation
mailing list