Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: libevent Warn: epoll_wait: Function not implemented #96

Open
konosubakonoakua opened this issue Jan 20, 2025 · 10 comments
Open

bug: libevent Warn: epoll_wait: Function not implemented #96

konosubakonoakua opened this issue Jan 20, 2025 · 10 comments
Assignees

Comments

@konosubakonoakua
Copy link

Describe the bug
libevent Warn: epoll_wait: Function not implemented when using pythonsoftioc

To Reproduce
Steps to reproduce the behavior:

  1. install softioc/cothread
  2. run official example code with python
  3. oops

Expected behavior
A clear and concise description of what you expected to happen.

Information (please complete the following):

  • PVXS Version or Git commit ID:
  • EPICS Base Version: 7.0.8.1
  • libevent Version: 2.1.12-stable
  • EPICS_HOST_ARCH: linux-aarch64
  • Host OS: dietpi (debian bookworm)
  • Compiler version: gcc version 12.2.0 (Debian 12.2.0-14)

Alternately, from a successful build, include the output of pvxinfo -D.

Network configuration
Values of any $EPICS_PVA* environment variables.
Mention if host(s) have more than one network interface, or on different subnets.

Additional context
Add any other context about the problem here.

@konosubakonoakua
Copy link
Author

workaround

Adding the code below

import os
os.environ['EVENT_NOEPOLL'] = '1'

@mdavidsaver
Copy link
Member

@konosubakonoakua Can you say more about your environment? Is there emulation?

Also, which version of the Linux kernel are you running? Did you build this kernel yourself?

I have encountered this error when running libevent based applications, including PVXS, in the valgrind analyzer. The workaround is as you describe. I recall this as a known issue with valgrind handling the epoll() syscalls, although I can not find a good reference just now...

I run successfully PVXS on raspbian 11 without any workaround. You should confirm that epoll() support is built into your kernel.

$ sudo modprobe configs
$ zgrep EPOLL /proc/config.gz 
CONFIG_EPOLL=y

@konosubakonoakua
Copy link
Author

konosubakonoakua commented Jan 21, 2025

@mdavidsaver I'm running softioc on a raspberry-pi-like SBC (radxa zero 3e) with dietpi os installed which is actually a debian bookworm distribution.
The kernel version is 5.10.160-legacy-rk35xx.
And surely it have EPOLL built-in:

Image

@konosubakonoakua
Copy link
Author

I found something:

pvxs/setup.py

Line 260 in ff1d651

'epoll_pwait2',

epoll_wait()
Linux 2.6, glibc 2.3.2.
epoll_pwait()
Linux 2.6.19, glibc 2.6.
epoll_pwait2()
Linux 5.11.

epoll_pwait2 was introduced in Linux 5.11, so maybe I need to install a newer kernel

@mdavidsaver
Copy link
Member

How are you getting, or building, the binaries you test? eg. where/how is the pvxslibs wheel built?

... I need to install a newer kernel

Or alternately, rebuild the wheels on your host, or one with the same or older set of kernel headers.

fyi. One reason why the Linux wheels uploaded to pypi.org are built on older container images is to take advantage of this backwords compatibility.

@konosubakonoakua
Copy link
Author

konosubakonoakua commented Jan 21, 2025

I install the python lib: softioc by pip install softioc then it install all its deps, I don't build anything manually expect the EPICS BASE

@mdavidsaver
Copy link
Member

I install the python lib: softioc by pip install softioc then it install all its deps

If only the Internet could be so simple :)

So far no aarch64 wheels are published to pypi.org for pvxslibs. So where is are the wheels you use coming from?

A raspbian install defaults to using pre-built wheels from https://www.piwheels.org. Last I checked, these were built on some version of raspbian.

$ cat /etc/pip.conf 
[global]
extra-index-url=https://www.piwheels.org/simple

fyi. pip install -v ... will show download URLs.

$ virtualenv junk
$ ./junk/bin/pip install -v --only-binary :all: softioc
...
  https://www.piwheels.org:443 "GET /simple/numpy/numpy-2.0.2-cp39-cp39-linux_armv7l.whl HTTP/1.1" 200 5849369
...

@konosubakonoakua
Copy link
Author

Piwheels only support 32bit version of arm SoCs.
I don't know where the wheels come from, maybe it's not using prebuilt wheels, instead, it compiles locally?

@AlexanderWells-diamond
Copy link
Contributor

It may be helpful to see the full pip install -v softioc command output; could you please run it and attach the output as a file (as it will be very long)?

@konosubakonoakua
Copy link
Author

It may be helpful to see the full pip install -v softioc command output; could you please run it and attach the output as a file (as it will be very long)?

ok, I'll do it tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants