search for: io_read

Displaying 20 results from an estimated 31 matches for "io_read".

2016 Jul 02
5
kqueue crash on FreeBSD with 2.2.25
...) failed: %m", args=0xffffab24 "8") at main.c:167 #6 0x2815b23a in i_panic (format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m") at failures.c:275 #7 0x28185e10 in io_loop_handle_add (io=0x288843a0) at ioloop-kqueue.c:67 #8 0x281815a8 in io_add_file (fd=56, condition=IO_READ, source_linenum=244, callback=0x2818a7d0 <signal_read>, context=0x0) at ioloop.c:59 #9 0x281813a6 in io_add (fd=56, condition=IO_READ, source_linenum=244, callback=0x2818a7d0 <signal_read>, context=0x0) at ioloop.c:81 #10 0x2818a666 in lib_signals_set_handler (signo=1, flags=3, handler...
2005 Dec 14
2
Patch: ioloop using kqueue/kevent for FreeBSD
...ude <sys/time.h> + +#ifndef INITIAL_BUF_SIZE +# define INITIAL_BUF_SIZE 128 +#endif + + +struct ioloop_handler_context { + int kq; + size_t evbuf_size; + struct kevent *evbuf; + + size_t fds_size; + struct fdrecord *fds; +}; + +struct fdrecord { + /* IO_READ | IO_WRITE | IO_ERROR */ + unsigned char mode : 3; +}; + + +void io_loop_handler_init(struct ioloop *ioloop) +{ + struct ioloop_handler_context *ctx; + + ioloop->handler_context = ctx = + p_new(ioloop->pool, struct ioloop_handler_context, 1); + ctx-&...
2016 Jul 04
3
kqueue crash on FreeBSD with 2.2.25
...ks for your help, Timo. > > > > #6 0x2815b23a in i_panic (format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m") at failures.c:275 > > #7 0x28185e10 in io_loop_handle_add (io=0x288843a0) at ioloop-kqueue.c:67 > > #8 0x281815a8 in io_add_file (fd=56, condition=IO_READ, source_linenum=244, callback=0x2818a7d0 <signal_read>, context=0x0) at ioloop.c:59 > > #9 0x281813a6 in io_add (fd=56, condition=IO_READ, source_linenum=244, callback=0x2818a7d0 <signal_read>, context=0x0) at ioloop.c:81 > > #10 0x2818a666 in lib_signals_set_handler (signo...
2004 Oct 25
0
[PATCH] move iolist functions into separate file
...0.000000000 +0300 +++ dovecot-1.0-test51/src/lib/iolist.c 2004-10-24 16:36:45.000000000 +0400 @@ -0,0 +1,56 @@ + +#include "lib.h" +#include "iolist.h" +#include "ioloop-internal.h" + +int iolist_add(struct io_list *list, struct io *io) +{ + if ((io->condition & IO_READ) != 0) { + i_assert(list->ios[IOLIST_INPUT] == NULL); + list->ios[IOLIST_INPUT] = io; + return list->ios[IOLIST_OUTPUT] == NULL; + } + if ((io->condition & IO_WRITE) != 0) { + i_assert(list->ios[IOLIST_OUTPUT] == NULL); + list->ios[IOLIST_OUTPUT] = io; + return list->...
2016 Jul 01
2
kqueue crash on FreeBSD with 2.2.25
Hi, 2.2.25 crashes on FreeBSD with a kqueue-related message. I see references to something similar (http://www.dovecot.org/list/dovecot/2012-February.txt) from a couple years ago. I get: Jul 1 10:07:27 imap dovecot: master: Panic: kevent(EV_ADD, READ, 54) failed: Bad file descriptor It's not dumping core, and I get the message even with "protocols =" Downgrading back to 2.2.24
2003 Apr 16
1
PATCH Add support for kqueue in ioloop subsystem
...oid io_loop_handler_deinit(struct ioloop *ioloop) { p_free(ioloop->pool, ioloop->handler_data); } void io_loop_handle_add(struct ioloop *ioloop, int fd, int condition) { short filter; struct ioloop_handler_data *data = ioloop->handler_data; i_assert(fd >= 0); if (condition & IO_READ) filter |= EVFILT_READ; if (condition & IO_WRITE) filter |= EVFILT_WRITE; EV_SET(&data->event, fd, filter, EV_ADD, 0, 0, NULL); if (kevent(data->kq, &data->event, 1, NULL, 0, NULL) < 0) { i_warning("couldn't add filter with kqueue: %m"); } } void io...
2012 Sep 19
1
[PATCH 1/1] lua: Enabling io.read() in Lua.c32 with some restrictions
...fndef NO_READ_NUMBER success = read_number(L, f); +#else + return luaL_argerror(L, n, "\"*number\" not supported"); +#endif break; case 'l': /* line */ success = read_line(L, f); @@ -388,7 +404,6 @@ static int io_read (lua_State *L) { static int f_read (lua_State *L) { return g_read(L, tofile(L), 2); } -#endif static int io_readline (lua_State *L) { @@ -441,7 +456,7 @@ static int f_write (lua_State *L) { return g_write(L, tofile(L), 2); } -#ifndef SYSLINUX +#ifndef NO_F_SEEK static int f_seek (lua_...
2004 Aug 30
0
[PATCH] [RFC] epoll based ioloop handler (now with patch)
...LERR | EPOLLHUP) +#define IO_EPOLL_OUTPUT (EPOLLOUT | EPOLLERR | EPOLLHUP) + +static int epoll_event_mask(struct io_list *list) +{ + int events = 0, i; + struct io *io; + + for (i = 0; i < list->count; i++) { + io = list->ios[i]; + + if (!io) + continue; + + if (io->condition & IO_READ) + events |= IO_EPOLL_INPUT; + if (io->condition & IO_WRITE) + events |= IO_EPOLL_OUTPUT; + } + + return events; +} + +static void iolist_add(struct io_list *list, struct io *io) +{ + int i; + + i_assert(list->count < EPOLL_IOS_PER_FD); + + for (i = 0; i < EPOLL_IOS_PER_FD; i++...
2018 Feb 06
1
Segmentation fault in "make check" test_istream_multiplex for 2.3.0 on Solaris Sparc
...if (pollfd->revents != 0) { I can see in gdb, that io->fd is "-1", so using it as an array index doesn't make much sense: (gdb) print io->fd $2 = -1 and the resulting address of pollfd is not valid. The full io struct is: (gdb) print *io $3 = {io = {condition = IO_READ, source_filename = 0x8c680 "test-multiplex.c", source_linenum = 84, pending = false, callback = 0x33c14 <test_istream_multiplex_stream_read>, context = 0xc4b80 <test_channel+48>, ioloop = 0x130dd0, ctx = 0x0}, prev = 0xecfc0, next = 0xd3548, refcount = 1, fd = -1, istr...
2005 Dec 15
2
Patch: More of kqueue() support.
...pyright (c) 2005 Vaclav Haisman <v.haisman@sh.cvut.cz> * @@ -16,6 +16,7 @@ #ifdef IOLOOP_KQUEUE +#include <unistd.h> #include <sys/types.h> #include <sys/event.h> #include <sys/time.h> @@ -24,6 +25,8 @@ # define INITIAL_BUF_SIZE 128 #endif +#define MASK (IO_READ | IO_WRITE | IO_ERROR) + struct ioloop_handler_context { int kq; size_t evbuf_size; @@ -57,6 +60,7 @@ void io_loop_handler_init(struct ioloop void io_loop_handler_deinit(struct ioloop *ioloop) { + close(ioloop->handler_context->kq); p_free(ioloop->po...
2007 Oct 21
2
dovecot 1.1.beta3 crashes on NetBSD/sparc64 4.0_RC3 with Thunderbird 2.0.0.6
...0x10000000d, next = 0x32e280, refcount = 0, fd = 0} (gdb) print *io->next $18 = {io = {condition = 0, callback = 0, context = 0x471a982100000000}, prev = 0x0, next = 0x2f766f6c2f686f6d, refcount = 1697606764, fd = 1870226479} (gdb) print *current_ioloop->io_files $35 = {io = {condition = IO_READ, callback = 0x1e9284 <event_callback>, context = 0x342080}, prev = 0x0, next = 0x320140, refcount = 1, fd = 11} (gdb) print *current_ioloop->io_files->next $36 = {io = {condition = IO_ERROR, callback = 0x12ca70 <log_error_callback>, context = 0x0}, prev = 0x320a00, next =...
2023 Feb 27
2
report BUG: io_uring triggers umount error
...analysis is correct. > Because ocfs2_file_read_iter() returns -EOPNOTSUPP, then fails > io_iter_do_read(), the io_issue_sqe missing fput() which causes umount failure > issue. > > io_issue_sqe > + io_assign_file //call fget(), but missing fput() > + def->issue() > | io_read > | + io_iter_do_read > | | ocfs2_file_read_iter > | | return: -EOPNOTSUPP //iocb->ki_flags:0x8 > | + kiocb_done > | + io_rw_done(&rw->kiocb, ret) > | | kiocb->ki_complete(kiocb, ret) > | | io_complete_rw > | | __...
2018 Feb 27
2
tinc 1.1: missing PONG
...play_search(&io_tree, &((io_t) { - .event = event - })); + if(WSAEnumNetworkEvents(io->fd, io->event, &network_events) != 0) { + return(false); + } - if(!io) { - abort(); - } + if(network_events.lNetworkEvents & READ_EVENTS) { + io->cb(io->data, IO_READ); - if(io->fd == -1) { - io->cb(io->data, 0); - } else { - WSANETWORKEVENTS network_events; + if(curgen != io_tree.generation) { + break; + } + } - if(WSAEnumNetworkEvents(io->fd, io->event, &network_events) != 0) { - return false; + /* +...
2016 Jul 11
4
2.3.0~alpha0-1~auto+197: Crash when openening a message via IMAP
>From the log: Jul 11 13:12:42 mproxy dovecot: imap-login: Login: user=<hildeb>, method=PLAIN, rip=141.42.206.36, lip=141.42.206.11, mpid=27254, TLS, session=<TGwoO1o3id+NKs4k> Jul 11 13:12:44 mproxy dovecot: imap(hildeb)<TGwoO1o3id+NKs4k>: Panic: file imap-client.c: line 854 (client_check_command_hangs): assertion failed: ((io_loop_find_fd_conditions(current_ioloop,
2004 Oct 25
0
[PATCH] Request for testing: BSD kqueue ioloop handler
...ta->events[i].udata == io) { + if (i < changed - 1) + data->events[i] = data->events[changed]; + data->events_changed--; + return; + } + } + + event = data->events + data->events_changed; + data->events_changed++; + + EV_SET(event, io->fd, + io->condition == IO_READ ? EVFILT_READ : EVFILT_WRITE, + EV_DELETE | EV_EOF, 0, 0, io); +} + +void io_loop_handler_run(struct ioloop *ioloop) +{ + struct ioloop_handler_data *data = ioloop->handler_data; + struct io_list *list; + struct kevent *event; + struct io *io; + struct timespec ts; + struct timeval tv; + unsign...
2023 Feb 26
1
report BUG: io_uring triggers umount error
...ith io_uring, and can't make sure my analysis is correct. Because ocfs2_file_read_iter() returns -EOPNOTSUPP, then fails io_iter_do_read(), the io_issue_sqe missing fput() which causes umount failure issue. io_issue_sqe + io_assign_file //call fget(), but missing fput() + def->issue() | io_read | + io_iter_do_read | | ocfs2_file_read_iter | | return: -EOPNOTSUPP //iocb->ki_flags:0x8 | + kiocb_done | + io_rw_done(&rw->kiocb, ret) | | kiocb->ki_complete(kiocb, ret) | | io_complete_rw | | __io_complete_rw_common | | +...
2023 Mar 01
1
report BUG: io_uring triggers umount error
...Because ocfs2_file_read_iter() returns -EOPNOTSUPP, then fails >> io_iter_do_read(), the io_issue_sqe missing fput() which causes umount failure >> issue. >> >> io_issue_sqe >> + io_assign_file //call fget(), but missing fput() >> + def->issue() >> | io_read >> | + io_iter_do_read >> | | ocfs2_file_read_iter >> | | return: -EOPNOTSUPP //iocb->ki_flags:0x8 >> | + kiocb_done >> | + io_rw_done(&rw->kiocb, ret) >> | | kiocb->ki_complete(kiocb, ret) >> | | io_comple...
2009 Mar 27
2
1.2.beta4: Fatal: io_loop_handle_add: epoll_ctl(1, 11): Bad file descriptor
...4.000000000 +0100 @@ -209,11 +209,6 @@ dict_process_destroyed(struct child_proc struct dict_listener *listener = process->listener; dict_process_deinit(process); - if (listener->processes == NULL) { - /* last listener died, create new ones */ - listener->io = io_add(listener->fd, IO_READ, - dict_listener_input, listener); - } } void dict_processes_init(void)
2023 Feb 28
1
[PATCH] io_uring: fix fget leak when fs don't support nowait buffered read
...get is busy. While tracing umount, it blames mnt_get_count() not return as expected. Do a deep investigation for fget()/fput() on related code flow, I've finally found that fget() leaks since ocfs2 doesn't support nowait buffered read. io_issue_sqe |-io_assign_file // do fget() first |-io_read |-io_iter_do_read |-ocfs2_file_read_iter // return -EOPNOTSUPP |-kiocb_done |-io_rw_done |-__io_complete_rw_common // set REQ_F_REISSUE |-io_resubmit_prep |-io_req_prep_async // override req->file, leak happens This was introduced by commit a196c78b5443 in v5.18....
2014 Jul 25
1
2.2.13 + hg: Panic: file ioloop.c: line 39 (io_add_file): assertion failed: (fd >= 0)
...rmat=0xc0c784 "file %s: line %d (%s): assertion failed: (%s)", args=0xbf82cd54 "\202\232?") at failures.c:657 #5 0x00bdf514 in i_panic (format=0xc0c784 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:267 #6 0x00bf162d in io_add_file (fd=-1, condition=IO_READ, source_linenum=816, callback=0x804d150 <client_input>, context=0x83ba628) at ioloop.c:40 #7 0x00bf272f in io_add_istream (input=0x83ba960, source_linenum=816, callback=0x804d150 <client_input>, context=0x83ba628) at ioloop.c:86 #8 0x0804d149 in client_output (client=0x83ba628) at...