Consistently reproducible with different versions of pypy while unmerging (or depcleaning, but surprisingly *not* while installing or autocleaning): /usr/lib64/portage/pym/portage/dbapi/vartree.py:4749: RuntimeWarning: C function without declared arguments called syncfs(fd) I'm not familiar with Python or this codebase, but it *does* seem that syncfs is being called with an undefined argument in that scope, as fd is defined in the other if branch.
It seems like a bug in pypy, because the relevant code should never call syncfs with an invalid file descriptor: try: fd = os.open(path, os.O_RDONLY) except OSError: pass else: try: syncfs(fd) except OSError: pass finally: os.close(fd) If os.open fails, then it's supposed to raise OSError, and the else branch is not supposed to execute.
I've reproduced this problem with pypy-2.0_beta1. It produces this warning message and returns -1 for all ctypes calls that I've tried. Here's a workaround which detects the failure and calls the "sync" program instead: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9f65889534279731f4b00af243c1edc885eece09
Have you filed a pypy bug yet?
(In reply to comment #3) > Have you filed a pypy bug yet? No, I have not.
The syncfs return value handling is in 2.1.11.39 and 2.2.0_alpha150.