Re: libev: segmentation fault in ev_feed_event().

2023-09-08 Thread Olivier Langlois
On Fri, 2023-09-08 at 18:26 -0400, Olivier Langlois wrote: > Any time ev_async_send() is called, there is no doubt that the > watcher > is active. > > The possible race condition is whether or not the async watcher will > be > in pending state when stopped. > > After studying libev code, I have c

Re: libev: segmentation fault in ev_feed_event().

2023-09-08 Thread Olivier Langlois
On Fri, 2023-09-08 at 21:39 +0200, Marc Lehmann wrote: > On Fri, Sep 08, 2023 at 02:32:46PM -0400, Olivier Langlois > wrote: > > but beside that, I have a hard time figuring out what could cause a > > segv into that small function... > > Almost always, this is caused by race condiitons between th

Re: libev: segmentation fault in ev_feed_event().

2023-09-08 Thread Marc Lehmann
On Fri, Sep 08, 2023 at 02:32:46PM -0400, Olivier Langlois wrote: > but beside that, I have a hard time figuring out what could cause a > segv into that small function... Almost always, this is caused by race condiitons between threads. For example, starting or stopping watcheres from multiple t

Re: libev: segmentation fault in ev_feed_event().

2023-09-08 Thread Olivier Langlois
On Sun, 2022-08-28 at 16:31 +0200, Marc Lehmann wrote: > On Sat, Aug 27, 2022 at 09:09:10PM +0530, Mushtaq Khan > wrote: > > I see a segmentation fault ev_feed_event() called from > > timer_reify(). I > > used to see this issue intermittently now i see this quite > > consistently in > > my work en

Re: EV_API_DECL inside ev.c

2023-08-31 Thread Marc Lehmann
Hi, first of all, please see the discussion about compiler warnings in the documentation: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS On Tue, Aug 29, 2023 at 05:07:23PM +0200, Christian Wendt he/him wrote: > libev-4.33/ev.c:2143:31: warning: ‘ev_default_loop_ptr’ ini

Re: Patch to fix typos in libev

2023-05-14 Thread Emanuele Giaquinta
Hi, On Fri, Apr 07, 2023 at 11:34:17AM -0700, Al Chu11 wrote: > Apologies if there is a different mailing list for this, I could not find > one. This is the one and only libev mailing list. > Recently did a spelling / typo check within our project and found some in > libev.  Went ahead and fixed

Re:

2023-02-18 Thread Marc Lehmann
On Fri, Feb 17, 2023 at 01:39:27PM +0530, sandeep cs wrote: > Need help for libev in android system. Lots of people seem to use it on android, so there doesn't seem to be anything missing. Afte rlal, android should be able to compile C. > I see in github portal only for linux is specified. I di

Re: Feature request: support "-fno-exception"

2023-02-18 Thread Marc Lehmann
Hi, and sorry for the late reply, somehow your mail slipped through moderation. On Wed, Dec 14, 2022 at 05:33:45PM +0800, Zhai Zhaoxuan wrote: > GCC & clang provide the "-fno-exception" flag to completely disable > exceptions for C++ code. I assume you mean fno-exceptions. > Some libraries a

Re: Need support

2023-02-06 Thread Marc Lehmann
On Sat, Feb 04, 2023 at 04:55:48PM +0530, Sudheer Hebbale wrote: > The loop itself is started in a thread, and the main thread waits from > interrupt (ctrl-c) to terminate the program. It's not clear to me what you eman with "waits from interrupt", but in general, when you use multiple threads,

Re: ev_io_modify usage?

2023-01-02 Thread Marc Lehmann
in a central place (good for maintainers and people reading the documentatioon as a tutorial). OR something in between. However, re-reeading some parts of the docs, it definitely could be clearer what was meant by access, and maybe some guidelines are missing. We did go through the docs and ma

Re: ev_io_modify usage?

2022-12-26 Thread Michael Stein
On Mon, Dec 26, 2022 at 01:11:22PM +0100, Marc Lehmann wrote: > On Sun, Dec 25, 2022 at 09:09:26PM -0800, Michael Stein > wrote: > > So I'm not sure when anyone would use ev_io_modify > > The documentatioon explains it: it is faster with some backends (e.g. > epoll) because the file descript

Re: ev_io_modify usage?

2022-12-26 Thread Marc Lehmann
On Sun, Dec 25, 2022 at 09:09:26PM -0800, Michael Stein wrote: > So I'm not sure when anyone would use ev_io_modify The documentatioon explains it: it is faster with some backends (e.g. epoll) because the file description is assumed to change. When using ev_io_Set, libev assumes that the file

Re: libev: segmentation fault in ev_feed_event().

2022-08-28 Thread Marc Lehmann
On Sat, Aug 27, 2022 at 09:09:10PM +0530, Mushtaq Khan wrote: > I see a segmentation fault ev_feed_event() called from timer_reify(). I > used to see this issue intermittently now i see this quite consistently in > my work environment. Most likely you are seeing the result of memory corruption d

Re: How to disable EV_FORK_ENABLE when building lib?

2022-02-09 Thread Marc Lehmann
On Wed, Feb 09, 2022 at 09:55:11AM -0500, Olivier Langlois wrote: > Sorry for the silly question... It's actually not an obvious question :) > I usually find the answer to that type of questions by doing .configure > --help or reading a build.txt file or something like that. That's likely beca

Re: perl EV module on Android 10 (terminal emulator)

2021-08-21 Thread Marc Lehmann
On Sat, Jun 05, 2021 at 11:06:43AM -0400, AC wrote: > I am running the Termux[0] terminal emulator on an Android 10 phone > (aarch64), with perl v5.32.1. Hi! Many apologies, but your mail seemed to be stuck in mailman for an extended period of time :/, or I just didn't see it for soem reason. >

Re: Recommended backend for Linux 5.11, and POSIX threads interop

2021-08-21 Thread Marc Lehmann
Hi! On Sat, Aug 21, 2021 at 08:37:55AM +0200, Amirouche wrote: > I am diving in to libev. > > 1) I want to understand what is the recommended backend; The pod document > goes into a long description of how epoll is broken, but then it seems to me > EPOLL is the recommended backend on Linux: epo

Re: Integrate the Glib main loop into the libev event loop (C++)

2021-07-14 Thread Oleksandr Kozlov
By the way, setting io_collect_interval to 0.1 solves the problem with hanging for this simple program that reads a file. However, it doesn't help for a more complex program that has a lot of different async calls. Does this information give some hints for figuring out a root cause? On Wed, Jul 7,

Re: Integrate the Glib main loop into the libev event loop (C++)

2021-07-07 Thread Marc Lehmann
On Wed, Jul 07, 2021 at 08:59:01AM +0200, Oleksandr Kozlov wrote: > I've tried to replace std::map with std::vector, but this didn't help. > Actually, I used std::list instead of std::vector, because ev::io has > a private copy constructor, but we might need to resize a vector Right, I ould have

Re: Integrate the Glib main loop into the libev event loop (C++)

2021-07-06 Thread Oleksandr Kozlov
> this is likely going to be slow Yeah, but performance is not a concern for my use case. > you could simply push them onto a vector and clear it out in check. I've tried to replace std::map with std::vector, but this didn't help. Actually, I used std::list instead of std::vector, because ev::io

Re: Integrate the Glib main loop into the libev event loop (C++)

2021-07-06 Thread Marc Lehmann
On Wed, Jul 07, 2021 at 12:06:37AM +0200, Oleksandr Kozlov wrote: > from the EV::Glib Perl module [3]. Note that this is likely going to be slow, as glib does not have the necessary hooks to efficiently be embedded into another event loop. > ctx.poll_fds.clear(); > int timeout = 0; > ctx.

Re: libev-4.31 has just been released

2021-05-06 Thread Olivier Langlois
I wasn't aware of libeio. I will take a look into it... Just to clarify my intent, the second patch wasn't meant for submission. Of course, I know that this cannot be accepted. The purpose for sharing it was to share what I was doing in terms of experimentation with your lib. On Thu, 2021-05-06 a

Re: libev-4.31 has just been released

2021-05-06 Thread Marc Lehmann
On Wed, May 05, 2021 at 09:54:38AM -0400, Olivier Langlois wrote: > I tend to disagree on the future of this new API. It seems to have a > lot of potential. I agree it has a lot of potential, but unless the kernel people get their act together and fix the bugs that prevent it from actually worki

Re: libev-4.31 has just been released

2021-05-05 Thread Olivier Langlois
to do. > > > In the meantime, I took care of one of the TODO item. That is using a > > single mmap() when possible. It is essentially code from liburing > > adapted to libev coding style... > > Thanks, when I come around to implement this I will certainly take > adva

Re: libev-4.31 has just been released

2021-05-04 Thread Marc Lehmann
t is essentially code from liburing > adapted to libev coding style... Thanks, when I come around to implement this I will certainly take advantage of your work, although this is currently on the back burner due to the issues with iouring. Would it be possible to re-send the patch properly thou

Re: libev-4.31 has just been released

2021-04-28 Thread Olivier Langlois
Here is a last quick sidenote concerning my CPU usage observation. CPU usage reported by top is now below 5% when using io_uring backend but it seems like the CPU is spent by something else inside the kernel as my average load did pass from 2.5 to ~3.1... On Wed, 2021-04-28 at 11:24 -0400, Olivie

Re: libev-4.31 has just been released

2021-04-28 Thread Olivier Langlois
Hi, I just wanted to report back that my usage with libev iouring backend appears to be working super fine. It is a WebSocket client opening about 64 TCP connections. The test has been performed with kernel 5.11.14. By switching from epoll backend to io_uring one, my process CPU usage did drop f

Re: Using ev_async for communication in the same event loop

2021-04-22 Thread Marc Lehmann
On Sun, Apr 18, 2021 at 01:09:03PM -0700, Arun Athrey Chandrasekaran wrote: > in an asynchronous way and not miss other events in the main event loop. Is > this expected to work? I looked at the documentation and it is not clear to > me if ev_async can be used for communication in the same event

Re: Iteration over registered handlers

2020-12-01 Thread Rick van Rein
Hi, >> For cleanup purposes, I'd like to iterate over registered event handlers >> after I've broken out of a loop. I cannot find a macro or function, is >> that not part of the API? > > It's not part of the API because it would require libev to add overhead to > track watchers. OK, that makes s

Re: libev/libuv interoperation with ev_async

2020-11-30 Thread Marc Lehmann
On Mon, Nov 30, 2020 at 10:47:24PM +0300, Mons Anderson wrote: > > Every thread works in cooperative multitasking mode > (https://github.com/tarantool/tarantool/blob/master/src/lib/core/fiber.h#L636) > For networking with clients created a separate, net thread > (https://github.com/tarantool/tara

Re: libev/libuv interoperation with ev_async

2020-11-30 Thread Mons Anderson
Thank you for the reply On Mon, Nov 30, 2020 at 9:41 PM Marc Lehmann wrote: > > On Mon, Nov 30, 2020 at 09:29:48PM +0300, Mons Anderson wrote: > > I've found that all I need to integrate them is to have access to > > evpipe (to put a watcher on it from another event loop), but libev > > interfac

Re: libev/libuv interoperation with ev_async

2020-11-30 Thread Marc Lehmann
On Mon, Nov 30, 2020 at 09:29:48PM +0300, Mons Anderson wrote: > I've found that all I need to integrate them is to have access to > evpipe (to put a watcher on it from another event loop), but libev > interface doesn't provide any way to access it. What exactly do you mean with evpipe? The inter

Re: Iteration over registered handlers

2020-11-30 Thread Marc Lehmann
On Wed, Nov 25, 2020 at 02:43:21PM +0100, Rick van Rein wrote: > I love libev. The complex to-do list in my mind quickly clears up when > I add it to a project. It's lovely to have this global database under a > single pointer that pops out relevant data alongside interesting events. > > For c

Re: libev tight loop

2020-10-27 Thread Marc Lehmann
On Tue, Oct 27, 2020 at 01:54:38AM -0400, Felipe Gasper wrote: > strace perl -MAnyEvent -e'AnyEvent->condvar()->recv()' > > > … causes tight-loop 0-second “epoll_wait”s. > > Obviously this isn’t very useful logic, so maybe you don’t consider this a > bug, but just in case I thought I’d po

Re: libev tight loop

2020-10-27 Thread Felipe Gasper
(And since I didn’t make it clear before, EV is indeed the backend that this AE install is using.) -F > On Oct 27, 2020, at 1:54 AM, Felipe Gasper wrote: > > Hi Marc, > > I saw that this: > > > strace perl -MAnyEvent -e'AnyEvent->condvar()->recv()' > > > … causes tight-loop

Re: callback never invoked

2020-10-25 Thread Marc Lehmann
On Sun, Oct 18, 2020 at 02:46:44PM +0500, rustahm wrote: > libev++ to watch a directory of files and call the callback function as > soon as inotify gives at least one relevant event. And I don't want libev++ > to block my main program, that's why I tried to use it with NOWAIT. All event librarie

Re: callback never invoked

2020-10-18 Thread rustahm
Thank you, Marc, for your input. This is my first time using such a library, so I guess I don't get your point. My main program should only receive a list of relevant events from inotify and process them through a callback function of the main program. I want libev++ to watch a directory of files

Re: callback never invoked

2020-10-12 Thread Marc Lehmann
On Sun, Oct 11, 2020 at 04:51:09PM +0500, rustahm wrote: > Please find attached the source code. Could anyone explain why the callback > is never invoked when I do change the files? You probably never call ev's mainloop: you only call ev::run once with NOWAIT, so unless any change happens before

Re: Linux GPIO support

2020-09-03 Thread Marc Lehmann
On Sat, Aug 15, 2020 at 04:45:19AM +, Anandu Suri wrote: > Hello Marc, Hi, and sorry for the delay. > Not sure if this is a design decision or buggy design. But given that Linux is It's a design bug. In any case, libev is not a linux-only library, and doe snot attempt to implement linux-on

Re: Critical sections with ev++.h

2020-07-19 Thread Marc Lehmann
On Fri, Jul 17, 2020 at 05:10:32PM +0200, Michele Santullo wrote: > notifications in separate threads and just print something to stdout when > they > occur. It's mostly working but I get occasionas crashes, which makes me think > it might be a concurrency issue. Right, it also means you are

Re: [PATCH] Fix linking errors when building with MinGW.

2020-05-04 Thread DDoSolitary
Oops, it is patch for a fork of libev. Sorry for sending it to the wrong place. On 2020/5/3 1:41, Marc Lehmann wrote: > On Sat, May 02, 2020 at 05:27:10PM +0800, DDoSolitary > wrote: >> One will get errors like "undefined reference to __imp_htonl" when >> trying to build libev with MinGW on Wind

Re: [PATCH] Fix linking errors when building with MinGW.

2020-05-02 Thread Marc Lehmann
On Sat, May 02, 2020 at 05:27:10PM +0800, DDoSolitary wrote: > One will get errors like "undefined reference to __imp_htonl" when > trying to build libev with MinGW on Windows. This patch fixes this by > linking to ws2_32, which provides winsock functions. Hmm, the patch doesn't seem to be for l

Re: About describe doubt for libev release ..

2020-03-29 Thread CandyMi
My personal reason for replying to your email so late! I am very sorry. Thank you for pointing out the problem of the mail format. Currently I use a browser to send mail. This format is likely to cause special characters to escape. I think I will try to improve it. --- I simulated the ev_once

Re: About describe doubt for libev release ..

2020-03-22 Thread Marc Lehmann
timeout > before calling ev_timer_stop to stop it. That's not what I said (in fact, I personally do not use the data field very often, and wish there was a nice way to get rid of it, but there isn't, unless you compile libev yourself). What I meant is more clearly explained in http

Re: libev-4.31 has just been released

2020-03-22 Thread Marc Lehmann
On Sun, Mar 22, 2020 at 05:57:02PM -0400, Benjamin Mahler wrote: > Thanks Marc, do you have any broader comments on the implications of > iouring for libev? It looks like iouring is finally bringing async system > calls (not just async io) to Linux. As far as I have been told, you will even be a

Re: libev-4.31 has just been released

2020-03-22 Thread Benjamin Mahler
Thanks Marc, do you have any broader comments on the implications of iouring for libev? It looks like iouring is finally bringing async system calls (not just async io) to Linux. Will libeio have an iouring backend that doesn't use a thread pool and instead hands the io off to the kernel with io_ur

Re: About describe doubt for libev release ..

2020-03-22 Thread CandyMi
>"While other data structures are possible and I vaguely plan some minor optimisations"   I'm very happy to hear what you said! Because every optimization of Timer makes it easy for developers to use without having to hold hands in some cases (I wrote a lot of code for this).   I mentioned i

Re: About describe doubt for libev release ..

2020-03-22 Thread Marc Lehmann
On Sun, Mar 22, 2020 at 12:56:16PM +0800, CandyMi <869646...@qq.com> wrote: > I have the same opinion about Linux aio and io_uring. The performance of aio > is not as good and problematic as described, but the use of io_uring may be > limited by the version of the Linux kernel and it makes me hes

Re: About describe doubt for libev release ..

2020-03-21 Thread CandyMi
thank you for your reply. I have the same opinion about Linux aio and io_uring. The performance of aio is not as good and problematic as described, but the use of io_uring may be limited by the version of the Linux kernel and it makes me hesitant. There may be very few people who follow up on

Re: About describe doubt for libev release ..

2020-03-21 Thread Marc Lehmann
>    1. "the documentation wrongly claimed that user may modify fd > and events members in io watchers when the watcher was stopped." means: > Can't modify internal members even if I/O watcher has been stopped? Yes - you have to use ev_io_set or the new ev_io_modify, direct modification does not

Re: libev-4.31 has just been released

2020-03-19 Thread Marc Lehmann
> Currently, the io_uring interface evelopment in libev is on hold, awaiting I might add, the iouring backend can be enabled in libev-4.33, and is expected to work. It has not really received testing, and it doesn't seem to have speed benefits yet. Anybody is invited to experiment with it - just

Re: libev-4.31 has just been released

2020-03-19 Thread Marc Lehmann
On Wed, Mar 18, 2020 at 01:19:37PM -0400, Benjamin Mahler wrote: > Just to follow up on this, if there have been any findings to share I'm > sure many of us in the mailing list would be interested! Currently, the io_uring interface evelopment in libev is on hold, awaiting bugfixes and new featur

Re: libev-4.31 has just been released

2020-03-18 Thread Olivier Langlois
I second that. I'm very interested in the current libev io_uring support state. I have seen a lot of commits for io_uring in the kernel 5.5.x releases for fixing bugs.It must be much more stable than it was back in December. I have seen an article this morning touting io_uring performance in the up

Re: libev-4.31 has just been released

2020-03-18 Thread Benjamin Mahler
Just to follow up on this, if there have been any findings to share I'm sure many of us in the mailing list would be interested! On Sun, Dec 22, 2019 at 1:32 PM Jens Axboe wrote: > On 12/22/19 11:29 AM, Marc Lehmann wrote: > > So, after a few more mails from Jens, things do get clearer. > > > >

Re: accept socket occasional read error

2020-02-29 Thread Bo Lorentsen
On 2/28/20 10:01 PM, Marc Lehmann wrote: That is confusing - if you read from the socket _without_ getting a readyness notification from libev, then of course you might get EAGAIN, but that wouldn't have anything to do with libev, as it isn't involved, right? This is by no means an libev error, b

Re: accept socket occasional read error

2020-02-28 Thread Marc Lehmann
On Tue, Feb 18, 2020 at 04:05:53PM +0100, Bo Lorentsen wrote: > >> that I can't read from, at all. recv returns -1 and EAGAIN, but it never > >> gets any data. > > You should not get readyness events from libev for sockets and then have > > recv > > return EAGAIN. > > No, and this is fortunately

Re: accept socket occasional read error

2020-02-24 Thread Bo Lorentsen
On 2/16/20 8:43 AM, Bo Lorentsen wrote: Hi ... Thanks for all your valuable input, I found the error at last, and the new version in my git spike is working as it should. The problem was starvation of my events and backlog overrun as a consequence, when the number of connections came in rea

Re: accept socket occasional read error

2020-02-18 Thread Bo Lorentsen
On 18.02.2020 12.24, Marc Lehmann wrote: > On Sun, Feb 16, 2020 at 08:43:20AM +0100, Bo Lorentsen wrote: >> I have a callback that gets called on every accept (where I loop on EAGAIN >> to empty the backlog), and for each new socket I make an protocol structure > You mean loop while accept is succ

Re: accept socket occasional read error

2020-02-18 Thread Marc Lehmann
On Sun, Feb 16, 2020 at 08:43:20AM +0100, Bo Lorentsen wrote: > I have a callback that gets called on every accept (where I loop on EAGAIN > to empty the backlog), and for each new socket I make an protocol structure You mean loop while accept is successful? > up to about 20k connections, and co

Re: accept socket occasional read error

2020-02-17 Thread Bo Lorentsen
I have updated my original event server spike, on gitlab. The url is : https://gitlab.com/druppy/spikes/-/tree/master/cpp/ev_server It should be compilable on any linux / bsd box, using cmake. It is a simple server that answers pong on all requests, if I test it using : ab -c 500 -n 3 http:/

Re: accept socket occasional read error

2020-02-16 Thread Bo Lorentsen
On 2/16/20 9:08 AM, Bernd Petrovitsch wrote: Hi all! Thanks for taking you time to look into this, I really appreciate it. I have been using libev for a while in a project at work (currently 4.25), with success for quite a while, and I have now expanded the usage in our service to also include

Re: accept socket occasional read error

2020-02-16 Thread Bernd Petrovitsch
Hi all! On Sun, 2020-02-16 at 08:43 +0100, Bo Lorentsen wrote: [...] > Sorry to write in this forum, but I have no idea as the where else to > ask :-) > > I have been using libev for a while in a project at work (currently > 4.25), with success for quite a while, and I have now expanded the usa

Re: libev-4.31 has just been released

2019-12-22 Thread Jens Axboe
On 12/22/19 11:29 AM, Marc Lehmann wrote: > So, after a few more mails from Jens, things do get clearer. > > He never got my mail, and was concerned that my explanation made him > look careless, when he obviously is the opposite and wants io_uring to > succeed (not his words, of course - I want it

Re: libev-4.31 has just been released

2019-12-22 Thread Jens Axboe
On 12/22/19 10:39 AM, Marc Lehmann wrote: > (Note that I have a conversation with Jens in private, as per his request, > but since he replied to this publicly, so do I) > >>> https://bugzilla.kernel.org/show_bug.cgi?id=204081 that bug >>> https://bugzilla.kernel.org/show_bug.cgi?id=204065 oops bug

Re: libev-4.31 has just been released

2019-12-22 Thread Marc Lehmann
So, after a few more mails from Jens, things do get clearer. He never got my mail, and was concerned that my explanation made him look careless, when he obviously is the opposite and wants io_uring to succeed (not his words, of course - I want it to succeed :). And, ahm, I guess, this is all grea

Re: libev-4.31 has just been released

2019-12-22 Thread Marc Lehmann
(Note that I have a conversation with Jens in private, as per his request, but since he replied to this publicly, so do I) > > https://bugzilla.kernel.org/show_bug.cgi?id=204081 that bug > > https://bugzilla.kernel.org/show_bug.cgi?id=204065 oops bug > > https://bugzilla.kernel.org/show_bug.cgi?id

Re: libev-4.31 has just been released

2019-12-22 Thread Jens Axboe
On 12/22/19 7:23 AM, Marc Lehmann wrote: > On Sat, Dec 21, 2019 at 06:45:20PM +, Benjamin Mahler > wrote: >> Sounds like some of the iouring findings are surprising to Jens (the >> author). > > Well, I mailed him personally (no response), opened bug reports on > bugzilla.kernel.org (no respo

Re: libev-4.31 has just been released

2019-12-22 Thread Marc Lehmann
On Sat, Dec 21, 2019 at 06:45:20PM +, Benjamin Mahler wrote: > Sounds like some of the iouring findings are surprising to Jens (the > author). Well, I mailed him personally (no response), opened bug reports on bugzilla.kernel.org (no response), and even found a discussion on the most pressin

Re: libev-4.31 has just been released

2019-12-22 Thread Jens Axboe
On 12/21/19 11:45 AM, Benjamin Mahler wrote: > + Jens > > Sounds like some of the iouring findings are surprising to Jens (the > author). > > Is there a benchmark he can run to look into this? > > Do you have more explanation about "silently ignore parts of the > requested events on an undocumen

Re: libev-4.31 has just been released

2019-12-21 Thread Benjamin Mahler
+ Jens Sounds like some of the iouring findings are surprising to Jens (the author). Is there a benchmark he can run to look into this? Do you have more explanation about "silently ignore parts of the requested events on an undocumented subset of file description types"? On Sat, Dec 21, 2019 at

Re: Wallclock jumps with/in/and libev

2019-12-20 Thread Marc Lehmann
On Thu, Dec 19, 2019 at 01:59:23AM +0100, Bernd Petrovitsch wrote: > Can this be handled with libev (and - if yes - how) somewhat > clean? Since you inadvertently forced me to give this some though, I have implemented the method using timerfd that I outlined in my last reply. The latest CVS ver

Re: Wallclock jumps with/in/and libev

2019-12-19 Thread Marc Lehmann
On Thu, Dec 19, 2019 at 01:59:23AM +0100, Bernd Petrovitsch wrote: > Can this be handled with libev (and - if yes - how) somewhat > clean? Well, define "somewhat clean"? :) libev should handle all forms of timejumps correctly, although a delay can be introduced. You can study the gory details i

Re: Segmentation fault in pipecb

2019-10-30 Thread Marc Lehmann
On Wed, Oct 30, 2019 at 01:22:22AM +, Calum McPherson wrote: > As noted this was 1st usage after a restart among otherwise stable, heavy > production use.I have scanned the mailing list from release 4.25 through > 4.27 and didn't see this issue raised therein. Likely because the issue

Re: libev-4.27 timeout not being respected?

2019-08-28 Thread Marc Lehmann
On Wed, Aug 28, 2019 at 10:30:36AM +1200, Samuel Williams wrote: > We noticed some regressions in timeout handling in libev-4.27 vs 4.25 > > I am just starting to investigate, but I thought I'd start a discussion > here too. There shouldn't be any intentional changes to timer handling, but bugs

Re: libev-4.27 timeout not being respected?

2019-08-27 Thread Samuel Williams
Okay - on the timeout issue, after investigating, I found it was a bug with our local modifications to libev. It's fixed now, and the issue has gone away. Regarding the warnings, there are still a lot of them. Maybe worth a casual glance to see if anything worth fixing. Kind regards, Samuel On W

Re: About "./configure" Checking the build environment

2019-06-26 Thread Marc Lehmann
On Wed, Jun 26, 2019 at 07:13:52AM +0800, CandyMI <869646...@qq.com> wrote: > I recently tried to install libev painlessly on Win32 to run my poor Lua Web > Web framework on it. > > > However, Win32 requires embedded compilation to take effect. Can I get better > libev build suggestions here?

Re: About "./configure" Checking the build environment

2019-06-26 Thread CandyMI
requires embedded compilation to take effect. Can I get better libev build suggestions here? -- Original -- From: "Marc Lehmann"; Date: Wed, Jun 26, 2019 06:51 AM To: "CandyMi"<869646...@qq.com>; Cc: "libev"; Subject: Re: Ab

Re: About "./configure" Checking the build environment

2019-06-25 Thread Marc Lehmann
On Wed, Jun 26, 2019 at 03:43:33AM +0800, CandyMI <869646...@qq.com> wrote: > I checked and found that the "./configure" file was taken from the package > file of libev-4.25.tar.gz. Good to hear :) > By the way, I saw the macro definition of IOCP in "ev.c". Does it mean that > libev will have a

Re: About "./configure" Checking the build environment

2019-06-25 Thread CandyMI
;ev.c". Does it mean that libev will have a plan supported by the Windows platform? -- Original -- From: "Marc Lehmann"; Date: Wed, Jun 26, 2019 03:27 AM To: "CandyMI"<869646...@qq.com>; Cc: "libev"; Subject: Re: About &qu

Re: About "./configure" Checking the build environment

2019-06-25 Thread Marc Lehmann
On Wed, Jun 26, 2019 at 01:15:25AM +0800, CandyMI <869646...@qq.com> wrote: > When I tried to build libev based on "configure", it didn't try to detect if > the system contains the following "linux/aio_abi.h" file Unless I build with > "sh autogen.sh". > > > Does this mean that using "./configu

Re: How to know connection disconnected while receive paused

2019-06-21 Thread Marc Lehmann
On Fri, Jun 21, 2019 at 08:25:22PM +, Tan Xiaofan wrote: > > general, there is no way to do it, neither for you nor for libev - you > > have to read the data that was sent to you until you get EOF or an error. > > If user space receive buffer is full, program can't call recv() because there

RE: How to know connection disconnected while receive paused

2019-06-21 Thread Tan Xiaofan
Thank you for your reply, I understand that this problem is not only use libev, but I still have some puzzles that I can't solve by myself. > If you don't read, you can't detect a remote connection close, and in > general, there is no way to do it, neither for you nor for libev - you > have to r

Re: How to know connection disconnected while receive paused

2019-06-21 Thread Marc Lehmann
On Fri, Jun 21, 2019 at 06:51:03PM +, Tan Xiaofan wrote: > I am learning how to write a server program using libev, but I encounter > some confusion. > > I write a very simple server, the server receive data and send back > intact. In order to handle the case of receive speed fa

Re: ocserv-main segfault in libev.so.4.0.0

2019-06-20 Thread Marc Lehmann
On Thu, Jun 20, 2019 at 10:37:25PM +0800, §汤圆§/ty <20207...@qq.com> wrote: > I am a small development team here, about 20 users connect to the ocserv > server through cisco anyconnect. I don't know how to manually reproduce this > problem, but in my scenario, the ocserv-main process will exit wit

Re: migrating libev to github.

2019-05-06 Thread Marc Lehmann
On Mon, May 06, 2019 at 04:53:57PM +0800, jianhui zhao wrote: > It is recommend migrating libev to github. Not true. -- The choice of a Deliantra, the free code+content MORPG -==- _GNU_ http://www.deliantra.net ==-- _ generation

Re: ev_set_allocator takes signed size

2019-03-22 Thread Samuel Williams
Thanks Marc. Do you think it makes sense to match the POSIX definition of `realloc`? http://pubs.opengroup.org/onlinepubs/9699919799/ I tested it locally and it seems okay. I know that's just one data point. Kind regards Samuel On Tue, 19 Mar 2019 at 07:01, Marc Lehmann wrote: > On Mon, Mar

Re: ev_set_allocator takes signed size

2019-03-18 Thread Marc Lehmann
On Mon, Mar 18, 2019 at 11:28:11AM +1300, Samuel Williams wrote: > Is there some reason why ev_set_allocator is defined as: If I remember correctly, this was because size_t and ssize_t were not very portable. > Because this produces warnings when trying to use `realloc` style > functions, defin

Re: How to get libev working with mingw32 compiler?

2019-01-24 Thread Ron Aaron
Never mind, I was able to get it working by fiddling around with the 'embedded' instructions.  Mysterious to my why I shouldn't be able to just configure and make... Ron Aaron | CTO Aaron High-Tech, Ltd | +1 516.373.0794 /

Re: question on using INADDR_LOOPBACK in ev_pipe

2018-11-30 Thread Tim Na
okay - thanks for your response. So far I have asked our customers to lower restriction or make exception to our app solely because of this issue of using local loop ip. It worked well until we are getting a lot more customers to handle and most of them (95%) are windows users. These majority us

Re: question on using INADDR_LOOPBACK in ev_pipe

2018-11-30 Thread Marc Lehmann
On Thu, Nov 29, 2018 at 02:57:29PM -0800, Tim Na wrote: > Sorry about that silly mistake (or threats) - I just learned not to use > company's email system for such request now. Sincere apologies for such > annoyance to you and libev community. > > However, I question still stands and I am lookin

Re: question on using INADDR_LOOPBACK in ev_pipe

2018-11-29 Thread Marc Lehmann
> *Confidentiality Notice: The information contained in this e-mail and any > attachments may be confidential. If you are not an intended recipient, you > are hereby notified that any dissemination, distribution or copying of this > e-mail is strictly prohibited. If you have received this e-mail in

Re: Switch to github

2018-09-05 Thread Marc Lehmann
On Tue, Sep 04, 2018 at 07:54:37PM +0200, Carlo Wood wrote: > He probably meant meant git (although then using github.com is a > logical choice). Well, he seems to have meant github, after all. > One of the reasons that switching to git makes sense is that > CVS is simply outdated. You mean out

Re: Switch to github

2018-09-04 Thread Carlo Wood
On Tue, 4 Sep 2018 19:54:37 +0200 Carlo Wood wrote: > On Wed, 29 Aug 2018 22:03:13 +0200 > Marc Lehmann wrote: > > > On Wed, Aug 29, 2018 at 02:30:21PM +0800, "jianhuizhao...@gmail.com" > > wrote: > > > It is recommended to switch from cvs to github. > > > > By whom? The evaluation of t

Re: Switch to github

2018-09-04 Thread Carlo Wood
On Wed, 29 Aug 2018 22:03:13 +0200 Marc Lehmann wrote: > On Wed, Aug 29, 2018 at 02:30:21PM +0800, "jianhuizhao...@gmail.com" > wrote: > > It is recommended to switch from cvs to github. > > By whom? The evaluation of the FSF for example gave github the worst > rating, an F. > > https://www.

Re: Switch to github

2018-08-30 Thread Bernd Petrovitsch
On Wed, 2018-08-29 at 14:30 +0800, jianhuizhao...@gmail.com wrote: > It is recommended to switch from cvs to github. *Who* recommends that and *why*? Unless that is answered, the mail is somewhere between spam and pure trolling. MfG, Bernd PS: The above used passive form is in German ac

Re: Switch to github

2018-08-29 Thread Marc Lehmann
On Wed, Aug 29, 2018 at 02:30:21PM +0800, "jianhuizhao...@gmail.com" wrote: > It is recommended to switch from cvs to github. By whom? The evaluation of the FSF for example gave github the worst rating, an F. https://www.gnu.org/software/repo-criteria-evaluation.html -- The ch

Re: I suggest you to add information about "FUNCTIONS CONTROLLING EVENT LOOPS" to several libev document sections.

2018-07-30 Thread Marc Lehmann
On Mon, Jul 30, 2018 at 08:10:59PM +0900, 裕士辻 wrote: > > About two weeks ago, I asked you to "stop API of ev_once event?". > Because I couldn't find userdata yet at that time. I only found ev_once to > set user data in libev. Can you explain the connection between the userdata api and your ev_on

Re: How to watch and read a file that another process is appending to?

2018-07-25 Thread Marc Lehmann
On Wed, Jul 25, 2018 at 08:06:39PM +0200, Carlo Wood wrote: > > can you please answer this question that I posted on > Stack Overflow: Sure. I have tried to give abit of background to help in udnerstanding these rather difficult problems, hope it helps! -- The choice of a

Re: Does libev provide stop API of ev_once event?

2018-07-17 Thread Marc Lehmann
On Sat, Jul 14, 2018 at 01:43:07AM +0900, 裕士辻 wrote: > I use ev_once, it's very convenience. But I have a problem about it. > I seem there is no stop API for ev_once, isn't it? No, there isn't. If you need the ability to stop watchers, you need to create one with the other API functions. I sugge

Re: Patch proposal.

2018-06-14 Thread Marc Lehmann
On Wed, Jun 13, 2018 at 01:32:05AM +0200, Carlo Wood wrote: > I had to fix a few minor things, so I thought I'd drop a line here. > See > https://github.com/CarloWood/evio/commit/b46d1fd72166262fc81309d5ab8b267658ca28da I can't really see anything that would qualify as fixing something - the firs

Re: Better Windows backend using wepoll?

2018-06-02 Thread Marc Lehmann
On Thu, May 31, 2018 at 07:55:13PM +0800, Linus Yang wrote: > Libev has relatively weaker support on Windows than other Unix-like > platforms (Linux, BSD and macOS) due to the complexity of IOCP event > model. Well, it's not weaker when it supports the same interface on windows. The problem lib

  1   2   3   4   5   6   7   8   9   10   >