Re: Bad system call: aio_read()
On Sat, Oct 12, 2002 at 09:26:52PM +0200, Philipp Mergenthaler wrote: Where is stuff like this documented for end-users? AFAIK right now it is only documented in sys/conf/NOTES. I've sent PR docs/39748 some time back which has a patch similar to yours (I forgot about the module, though). I submitted a followup to your PR: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=102141+0+current/freebsd-doc The patch I submitted gives information for adding the kernel config option VFS_AIO, or doing a kldload aio in order to get aio. Hopefully this patch is OK enough to be applied. Thanks. -- Craig Rodrigues http://www.gis.net/~craigr [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Bad system call: aio_read()
On Sat, 12 Oct 2002 11:57:23 -0400, Craig Rodrigues [EMAIL PROTECTED] said: I am trying to port the ACE library ( http://www.cs.wustl.edu/~schmidt/ACE.html ) to FreeBSD-CURRENT, and it is very confusing that code in -STABLE which compiled and worked, does not work the same way in -CURRENT. (ie. the code compiles, but it crashes because of a new kernel option not being enabled or a module not being kldload'ed). The code is erroneous. In -current, _POSIX_ASYNCHRONOUS_IO is defined with value zero, which indicates that an application must call pathconf() or fpathconf() with key _PC_ASYNC_IO to determine whether AIO is supported for the path or file descriptor in question. If you call AIO functions without first checking whether they are available in the run-time environment, your computer is liable to turn into a frog. Other nasty things, such as abnormal program termination resulting from SIGSYS, may also happen. (If the code actually did this, it would find that FreeBSD's implementation of pathconf() is somewhat broken and always fails for this key. This is on my list of things to fix in my Copious Free Time, but if a Junior Kernel Hacker cared to do it for me I wouldn't mind at all.) -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Bad system call: aio_read()
On Sat, Oct 12, 2002 at 09:53:02AM -0400, Craig Rodrigues wrote: I just did a cvsup and rebuilt the world on my -CURRENT system. If I try to run the following program, I get a Bad system call coredump: [...] 2660 a.outCALL aio_read(0xbfbffb88) 2660 a.outRET aio_read -1 errno 78 Function not implemented Does your kernel configuration file contain the line options VFS_AIO? I have a kernel (with this option)+world from yesterday, and aio_read works. Bye, Philipp -- http://www.uni-karlsruhe.de/~un1i/ (,.) \\\@@ ) \= ) cc_|\_,^ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Bad system call: aio_read()
Hello, On 0, Philipp Mergenthaler [EMAIL PROTECTED] wrote: On Sat, Oct 12, 2002 at 09:53:02AM -0400, Craig Rodrigues wrote: I just did a cvsup and rebuilt the world on my -CURRENT system. If I try to run the following program, I get a Bad system call coredump: [...] 2660 a.outCALL aio_read(0xbfbffb88) 2660 a.outRET aio_read -1 errno 78 Function not implemented Does your kernel configuration file contain the line options VFS_AIO? I have a kernel (with this option)+world from yesterday, and aio_read works. you can get this functionality with kldload aio Bye, Dirk To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Bad system call: aio_read()
Hi, I just did a cvsup and rebuilt the world on my -CURRENT system. If I try to run the following program, I get a Bad system call coredump: #include time.h #include aio.h int main(int argc, char *argv[]) { struct aiocb b; aio_read(b); } ./a.out Bad system call (core dumped) If I do a ktrace, I get: 2660 a.outCALL mprotect(0x28069000,0xb4000,0x5) 2660 a.outRET mprotect 0 2660 a.outCALL sigaction(0x4,0xbfbffb08,0xbfbffae8) 2660 a.outRET sigaction 0 2660 a.outCALL sigprocmask(0x1,0,0x2805fabc) 2660 a.outRET sigprocmask 0 2660 a.outCALL sigaction(0x4,0xbfbffae8,0) 2660 a.outRET sigaction 0 2660 a.outCALL sigprocmask(0x1,0x2805fa80,0xbfbffb38) 2660 a.outRET sigprocmask 0 2660 a.outCALL sigprocmask(0x3,0x2805fa90,0) 2660 a.outRET sigprocmask 0 2660 a.outCALL aio_read(0xbfbffb88) 2660 a.outRET aio_read -1 errno 78 Function not implemented 2660 a.outPSIG SIGSYS SIG_DFL 2660 a.outNAMI a.out.core Any idea what I am doing wrong? This doesn't happen on one of my -STABLE systems. -- Craig Rodrigues http://www.gis.net/~craigr [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Bad system call: aio_read()
On Sat, Oct 12, 2002 at 04:49:25PM +0200, Dirk Roehrdanz wrote: Hello, On 0, Philipp Mergenthaler [EMAIL PROTECTED] wrote: On Sat, Oct 12, 2002 at 09:53:02AM -0400, Craig Rodrigues wrote: I just did a cvsup and rebuilt the world on my -CURRENT system. If I try to run the following program, I get a Bad system call coredump: [...] 2660 a.outCALL aio_read(0xbfbffb88) 2660 a.outRET aio_read -1 errno 78 Function not implemented Does your kernel configuration file contain the line options VFS_AIO? I have a kernel (with this option)+world from yesterday, and aio_read works. I do not have options VFS_AIO in my kernel config. you can get this functionality with kldload aio Thanks, doing a kldload aio worked. Where is stuff like this documented for end-users? In this patch to /usr/src/sys/sys/syscalls.master that AIO was made a loadable module: === Revision 1.101 / (download) - annotate - [select for diffs], Sat Dec 29 07:13:45 2001 UTC (9 months, 1 week ago) by alfred Branch: MAIN Changes since 1.100: +8 -8 lines Diff to previous 1.100 (colored) Make AIO a loadable module. === I am trying to port the ACE library ( http://www.cs.wustl.edu/~schmidt/ACE.html ) to FreeBSD-CURRENT, and it is very confusing that code in -STABLE which compiled and worked, does not work the same way in -CURRENT. (ie. the code compiles, but it crashes because of a new kernel option not being enabled or a module not being kldload'ed). This will be very confusing to end-users of ACE on FreeBSD unless it is documented. Would the following patch be acceptable for the aio_read man page? I can supply a similar patch to the other POSIX aio functions. Thanks. -- Craig Rodrigues http://www.gis.net/~craigr [EMAIL PROTECTED] --- aio_read.2.orig Sat Oct 12 11:42:52 2002 +++ aio_read.2 Sat Oct 12 11:55:57 2002 @@ -179,6 +179,33 @@ .Fa iocb-aio_offset would be invalid. .El +.Sh KERNEL OPTIONS +The following kernel configuration option +(see +.Xr config 8 ) +is required +.Pp +.Dl options VFS_AIO +.Pp +If you do not want AIO support included in the kernel, but +want to use it occasionally, do not add the +.Dv VFS_AIO +option. Instead, load the +.Nm aio +module as desired: +.Pp +.Dl kldload aio +.Pp +.Sh SEE ALSO +.Xr aio_cancel 2 , +.Xr aio_error 2 , +.Xr aio_return 2 , +.Xr aio_suspend 2 , +.Xr aio_waitcomplete 2 , +.Xr aio_write 2 , +.Xr config 8 , +.Xr kldload 8 , +.Xr kldunload 8 .Sh STANDARDS The .Fn aio_read
Re: Bad system call: aio_read()
On Sat, Oct 12, 2002 at 11:57:23AM -0400, Craig Rodrigues wrote: I just did a cvsup and rebuilt the world on my -CURRENT system. If I try to run the following program, I get a Bad system call coredump: [...] 2660 a.outCALL aio_read(0xbfbffb88) 2660 a.outRET aio_read -1 errno 78 Function not implemented [...] Where is stuff like this documented for end-users? AFAIK right now it is only documented in sys/conf/NOTES. I've sent PR docs/39748 some time back which has a patch similar to yours (I forgot about the module, though). Bye, Philipp To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message