Comments (25)
@AminRezaei0x443 I really need this Rift lang to work! FunC is killing me!😩😩😩
from rift.
You can find the core at /var/lib/apport/coredump/
but never mind, I figured it out, it's caused by an AVX-512 instruction. Working on the fix!
from rift.
Great, so this issue is resolved. The other issue you mentioned is not an error. You should provide a target name, not a target path. Use:
rift build bare_template
And it will work. You can use all
target to build all contracts.
from rift.
Closing the issue as It's resolved, Thanks for your help. I will also try to output better message for the new error you shared.
from rift.
Me too! Is there a specific required OS or Python version?
from rift.
Thanks for reporting the bug! Could you kindly share the result of cat /proc/cpuinfo
? flags
for one core are sufficient.
from rift.
If you're on windows try getting HwInfo
software and share an screenshot of the features
part.
from rift.
If you're on windows try getting
HwInfo
software and share an screenshot of thefeatures
part.
I'm on macOS and Linux. @LaDoger maybe you can try this on Windows.
from rift.
Thanks for reporting the bug! Could you kindly share the result of
cat /proc/cpuinfo
?flags
for one core are sufficient.
➜ ~ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 23
model : 49
model name : DO-Regular
stepping : 0
microcode : 0x1000065
cpu MHz : 1996.247
cache size : 512 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr wbnoinvd arat npt nrip_save umip rdpid
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed
bogomips : 3992.49
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
from rift.
I can't even get to this point on Windows! I get:
ImportError: Wasmer is not available on this system
from rift.
On Linux I get illegal hardware instruction (core dumped)
too.
from rift.
I can't even get to this point on Windows! I get:
ImportError: Wasmer is not available on this system
Right, I am getting this on macOS too (see #14).
from rift.
@merc1er Could you please run and share the output of this code?
from rift.runtime.riftlib import RiftLibSetup
print(RiftLibSetup.determine_lib())
print(RiftLibSetup.get_env_info())
from rift.
@merc1er Could you please run and share the output of this code?
from rift.runtime.riftlib import RiftLibSetup print(RiftLibSetup.determine_lib()) print(RiftLibSetup.get_env_info())
In [1]: from rift.runtime.riftlib import RiftLibSetup
...: print(RiftLibSetup.determine_lib())
https://github.com/AminRezaei0x443/ton/releases/download/v0.1.0/rift-lib-ubuntu-22.04.so
In [2]: print(RiftLibSetup.get_env_info())
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[2], line 1
----> 1 print(RiftLibSetup.get_env_info())
File /usr/local/lib/python3.10/dist-packages/rift/runtime/riftlib.py:90, in RiftLibSetup.get_env_info(cls)
87 @classmethod
88 def get_env_info(cls):
89 return {
---> 90 "libs": cls.get_shared_libs(),
91 "glibc": cls.get_glibc_version(),
92 }
File /usr/local/lib/python3.10/dist-packages/rift/runtime/riftlib.py:69, in RiftLibSetup.get_shared_libs(cls)
67 @classmethod
68 def get_shared_libs(cls):
---> 69 ok, res = cls._call_get("ldconfig -p")
70 if not ok:
71 raise RuntimeError("Error fetching shared libraries!")
File /usr/local/lib/python3.10/dist-packages/rift/runtime/riftlib.py:57, in RiftLibSetup._call_get(cls, command)
55 @classmethod
56 def _call_get(cls, command):
---> 57 p = subprocess.Popen(
58 command,
59 stdout=subprocess.PIPE,
60 stderr=subprocess.PIPE,
61 )
62 out, err = p.communicate()
63 if p.returncode == 0:
File /usr/lib/python3.10/subprocess.py:969, in Popen.__init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize)
965 if self.text_mode:
966 self.stderr = io.TextIOWrapper(self.stderr,
967 encoding=encoding, errors=errors)
--> 969 self._execute_child(args, executable, preexec_fn, close_fds,
970 pass_fds, cwd, env,
971 startupinfo, creationflags, shell,
972 p2cread, p2cwrite,
973 c2pread, c2pwrite,
974 errread, errwrite,
975 restore_signals,
976 gid, gids, uid, umask,
977 start_new_session)
978 except:
979 # Cleanup if the child failed starting.
980 for f in filter(None, (self.stdin, self.stdout, self.stderr)):
File /usr/lib/python3.10/subprocess.py:1845, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, gid, gids, uid, umask, start_new_session)
1843 if errno_num != 0:
1844 err_msg = os.strerror(errno_num)
-> 1845 raise child_exception_type(errno_num, err_msg, err_filename)
1846 raise child_exception_type(err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'ldconfig -p'
from rift.
It's weird. Try to run this command so the core dump includes pid
in it.
sudo sysctl -w kernel.core_uses_pid=1
System should dump the core under a file named core.<pid>
in the directory you're executing. Now, use gdb so we can find out which instruction is causing this problem.
gdb program core.<pid>
Change the layout to asm
with this command inside gdb
so you can find the instruction code:
layout asm
Share the result so I can assist further. If you have issues with gdb
you can share the core dump with me so I can take a look (Telegram: https://t.me/Amin0x443)
from rift.
No file was created by the command:
➜ ~ sudo sysctl -w kernel.core_uses_pid=1
kernel.core_uses_pid = 1
from rift.
By the way, I am using a fresh install of Ubuntu 22 on a Digital Ocean server. If that's easier, you can either spin up your own or I can give you access to mine (it's fresh, almost nothing installed) if give me an SSH public key.
Also, I've no idea of how Rift works, but seems like it is doing a lot of low level system calls. So it would probably be best to have it dockerized.
from rift.
Yes, that command just does the configuration. You should run rift init
to cause a core dump. But no need, I have access to digital ocean servers so I'll check that myself.
from rift.
Ah ok. I am unable to run rift init
though.
➜ rift sudo sysctl -w kernel.core_uses_pid=1
kernel.core_uses_pid = 1
➜ rift rift init
[1] 37332 illegal hardware instruction (core dumped) rift init
from rift.
Didn't it create a file in the directory you were working?
from rift.
Didn't it create a file in the directory you were working?
No:
from rift.
Run this:
cat /proc/sys/kernel/core_pattern
It should show the core dumps pattern.
from rift.
➜ ~ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E
from rift.
This issue is now fixed in the current release. Run pip install -U rift-framework
to upgrade. Let me know about the result.
from rift.
This issue is now fixed in the current release. Run
pip install -U rift-framework
to upgrade. Let me know about the result.
Great! Thanks! I can confirm upgrading rift fixes the illegal hardware issue.
I can probably close this issue, however when compiling the contract with rift build
I am getting a KeyError
:
➜ project git:(main) rift build contracts/bare_template.py
Building contracts/bare_template.py from bare-template project ...
Traceback (most recent call last):
File "/usr/local/bin/rift", line 8, in <module>
sys.exit(entry())
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/rift/cli/commands/build.py", line 55, in build
config.contracts[target],
KeyError: 'contracts/bare_template.py'
from rift.
Related Issues (10)
- rift init creates project with wrong permissions HOT 1
- Wasmer is not available on this system HOT 5
- Incompatible Architecture (have `x86_64`, need `arm64`) HOT 1
- API documentation
- Implementing poetry support HOT 1
- Implementing showcase command HOT 1
- Issue with paths when installed through poetry HOT 4
- Issues with poetry installation HOT 10
- KeyError: Can't build contract HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rift.