Re: Error lookup function 'posix_fallocate'

2020-11-04 Thread Greg Steuck
"Dimitri Karamazov"  writes:

> I'm trying to build freenet, but it requires posix_fallocate for most of it's 
> file sharing
> capabilities. Apparently OpenBSD doesn't have it. There is nothing I could 
> find regarding this
> in the mailing list archives. Could I know the reason and what
> alternative call I could use if any.

Web searches bring up some hits with patches, e.g
"[PATCH] Initial implementation of posix_fallocate(2)"[0]

Since the patch is quite dated and didn't seem to generate a ton of
interest then, I don't expect it to be readily applicable or easy to
convince people about.

My cursory reading of FreeBSD man page suggests this is an optimization
rather than an indispensible operation. You could try to stub this call
out entirely and see how far it gets you.

Thanks
Greg

[0] 
http://openbsd-archive.7691.n7.nabble.com/PATCH-Initial-implementation-of-posix-fallocate-2-td277940.html



Error lookup function 'posix_fallocate'

2020-11-04 Thread Dimitri Karamazov
I'm trying to build freenet, but it requires posix_fallocate for most of it's 
file sharing
capabilities. Apparently OpenBSD doesn't have it. There is nothing I could find 
regarding this
in the mailing list archives. Could I know the reason and what alternative call 
I could use if any.

Nov 04, 2020 10:56:42:345 (freenet.node.UptimeEstimator, 
WrapperListener_start_runner, ERROR): Unable to read old
uptime file: /var/freenet/uptime.old.dat - we will assume we weren't online 
during that period
Nov 04, 2020 10:56:42:548 (freenet.support.PooledExecutor$MyThread, Start 
store(4), ERROR): Caught
java.lang.UnsatisfiedLinkError: Error looking up function 'posix_fallocate': 
Unable to resolve symbol running job
freenet.support.PooledExecutor$Job@5711ee95
java.lang.UnsatisfiedLinkError: Error looking up function 'posix_fallocate': 
Unable to resolve symbol
at com.sun.jna.Function.(Function.java:245)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:566)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:542)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:528)
at com.sun.jna.Native.register(Native.java:1777)
at com.sun.jna.Native.register(Native.java:1648)
at com.sun.jna.Native.register(Native.java:1360)
at 
freenet.support.io.Fallocate$FallocateHolderPOSIX.(Fallocate.java:93)
at freenet.support.io.Fallocate.execute(Fallocate.java:72)
at 
freenet.store.saltedhash.SaltedHashFreenetStore.setStoreFileSize(SaltedHashFreenetStore.java:1087)
at 
freenet.store.saltedhash.SaltedHashFreenetStore.start(SaltedHashFreenetStore.java:284)
at 
freenet.store.caching.CachingFreenetStore.start(CachingFreenetStore.java:222)
at freenet.node.Node$54.run(Node.java:2942)
at 
freenet.support.PooledExecutor$MyThread.innerRun(PooledExecutor.java:249)
at 
freenet.support.PooledExecutor$MyThread.realRun(PooledExecutor.java:189)
at freenet.support.io.NativeThread.run(NativeThread.java:156)
Nov 04, 2020 10:56:42:548 (freenet.support.PooledExecutor$MyThread, Migrate 
store(1), ERROR): Caught
java.lang.NoClassDefFoundError: Could not initialize class 
freenet.support.io.Fallocate$FallocateHolderPOSIX running
job freenet.support.PooledExecutor$Job@a877a2c
java.lang.NoClassDefFoundError: Could not initialize class 
freenet.support.io.Fallocate$FallocateHolderPOSIX
at freenet.support.io.Fallocate.execute(Fallocate.java:72)
at 
freenet.store.saltedhash.SaltedHashFreenetStore.setStoreFileSize(SaltedHashFreenetStore.java:1087)
at 
freenet.store.saltedhash.SaltedHashFreenetStore.start(SaltedHashFreenetStore.java:284)
at 
freenet.store.caching.CachingFreenetStore.start(CachingFreenetStore.java:222)
at freenet.node.Node$56.run(Node.java:3035)
at 
freenet.support.PooledExecutor$MyThread.innerRun(PooledExecutor.java:249)
at 
freenet.support.PooledExecutor$MyThread.realRun(PooledExecutor.java:189)
at freenet.support.io.NativeThread.run(NativeThread.java:156)
Nov 04, 2020 10:57:36:939 (freenet.client.async.SingleFileInserter, 
(16), ERROR): Caught in
OffThreadCompressor: java.lang.NoClassDefFoundError: Could not initialize class
freenet.support.io.Fallocate$FallocateHolderPOSIX
java.lang.NoClassDefFoundError: Could not initialize class 
freenet.support.io.Fallocate$FallocateHolderPOSIX
at freenet.support.io.Fallocate.execute(Fallocate.java:72)
at 
freenet.support.io.PooledFileRandomAccessBuffer.(PooledFileRandomAccessBuffer.java:106)
at 
freenet.support.io.PooledFileRandomAccessBuffer.(PooledFileRandomAccessBuffer.java:85)
at 
freenet.support.io.PooledFileRandomAccessBufferFactory.makeRAF(PooledFileRandomAccessBufferFactory.java:32)
at
freenet.support.io.DiskSpaceCheckingRandomAccessBufferFactory.makeRAF(DiskSpaceCheckingRandomAccessBufferFactory.java:42)
at 
freenet.support.io.MaybeEncryptedRandomAccessBufferFactory.makeRAF(MaybeEncryptedRandomAccessBufferFactory.java:42)
at 
freenet.client.async.SplitFileInserterStorage.(SplitFileInserterStorage.java:532)
at 
freenet.client.async.SplitFileInserter.(SplitFileInserter.java:86)
at 
freenet.client.async.SingleFileInserter.onCompressedInner(SingleFileInserter.java:380)
at 
freenet.client.async.SingleFileInserter.onCompressed(SingleFileInserter.java:165)
at 
freenet.client.async.InsertCompressor$3.run(InsertCompressor.java:227)
at 
freenet.client.async.PersistentJobRunnerImpl$JobRunnable.run(PersistentJobRunnerImpl.java:136)
at 
freenet.support.PooledExecutor$MyThread.innerRun(PooledExecutor.java:249)
at 
freenet.support.PooledExecutor$MyThread.realRun(PooledExecutor.java:189)
at freenet.support.io.NativeThread.run(NativeThread.java:156)
Nov 04, 2020 10:57:36:940 (freenet.client.InsertException, (16), 
ERROR): Internal error:
freenet.client.InsertException: Internal error: