当前位置:网站首页>Summary of small problems in smartbugs installation
Summary of small problems in smartbugs installation
2022-06-25 07:41:00 【Xiao Chen who wants to lie flat】
smartBugs
SmartBugs Is an execution framework , It aims to simplify the execution of analysis tools on smart contract data sets .
(1) One is based on Docker Mirror the plug-in system that easily adds new analysis tools ;
(2) Parallel execution of tools to speed up execution time ;
(3) An output mechanism , The way the tool outputs results can be standardized , And simplify the output process across tools .
(4) According to the requirements of the analyzed contract , Automatically detect and download the correct version of Solidity compiler .
Problems during installation
PS:smartbugs need python3.8 Version above , Because he used walrus operator := stay 3.8 The following versions will be for := Error reporting .
2022.4.4 First installation smartbugs, When smartbugs When analyzing smart contract data sets through a large number of multi-threaded pools , There will be the following problems , This causes the program to terminate unexpectedly , Contract analysis failed
multiprocessing.pool.RemoteTraceback: # Mainly this problem
""" Traceback (most recent call last): File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar return list(map(*args)) File "smartBugs.py", line 45, in analyse raise e File "smartBugs.py", line 31, in analyse analyse_files(tool, file, logs, output_folder, sarif_outputs, output_version, import_path) File "/blockchain/smartbug/smartbugs/src/docker_api.py", line 233, in analyse_files if solc_compiler is not None: UnboundLocalError: local variable 'solc_compiler' referenced before assignment """
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "smartBugs.py", line 176, in <module>
exec_cmd(args)
File "smartBugs.py", line 147, in exec_cmd
pool.map(analyse, tasks)
File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/local/python3/lib/python3.8/multiprocessing/pool.py", line 768, in get
raise self._value
UnboundLocalError: local variable 'solc_compiler' referenced before assignment
2022.6.21 smartBugs Our developers fixed this bug, But when reinstalling , I use the compressed package to decompress and install smartbugs, Not through git clone, The program can run , But no results , stay result.log The following questions are shown in standard_init_linux.go:178: exec user process caused "no such file or directory" Find out through various ways , Most blogs give the following explanations :
golang docker build After making the input item, run and report an error
The reason for this problem is that the compiling environment is different from the running environment , There may be dynamic library dependencies
1. Default go Use static links , stay docker Of golang Dynamic compilation is used by default in the environment .
2. If you want to use docker compile +alpine Deploy , You can disable cgoCGO_ENABLED=0 To solve .
3. If you want to use cgo Can pass go build --ldflags "-extldflags -static" To make the gcc Use static compilation .
in general , It may be the problem of dynamic library dependency , But I don't know how to change it , The explanation I give here :
(1) I download it locally windows After compression, upload to linux On , because windows and linux Inconsistencies between lead to
(2) When we decompress with the compressed package , Maybe it's useless git clone So some dynamic configuration problems are missing , It's causing this problem
Give solutions , Use git clone https://github.com/smartbugs/smartbugs.git Download and install , But in git clone The following errors will occur during the process :
First of all : This method useless , as follows :
Change to :git clone git://github.com/xxx.git
Causes of the following problems :
Remote and convenient HTTP Maximum number of cache bytes when transferring request data , by default 1M byte , By default, it can meet most requests . And when git clone It's a big file , You need to turn it up git Cache value
Solution :sudo git config --global http.postBuffer 5242880000
边栏推荐
- Sichuan earth microelectronics high performance, high integration and low cost isolated 485 transceiver
- Pytorch遇到的坑:为什么模型训练时,L1loss损失无法下降?
- Chuantuwei ca-is3720lw alternative material No. iso7820fdw
- Distributed quorum NWR of the alchemy furnace of the Supreme Master
- [introduction to UVM== > episode_9] ~ register model, integration of register model, general methods of register model, application scenarios of register model
- The perfect presentation of Dao in the metauniverse, and platofarm creates a farm themed metauniverse
- What is the difference between norflash and nandflash
- 【批处理DOS-CMD命令-汇总和小结】-文件与目录操作命令(md、rd、xcopy、dir、cd、set、move、copy、del、type、sort)
- 海思3559 sample解析:vio
- What common APIs are involved in thread state changes
猜你喜欢

13 `bs_duixiang.tag标签`得到一个tag对象

Full range of isolator chips with integrated isolated power supply
![[batch dos-cmd command - summary and summary] - external command -cmd download command and packet capture command (WGet)](/img/00/5a5b081b78ad6a6c1c3a3c847dd315.png)
[batch dos-cmd command - summary and summary] - external command -cmd download command and packet capture command (WGet)

Leetcode daily question - 515 Find the maximum value in each tree row
![[Batch dos - cmd Command - Summary and Summary] - cmd extension Command, extension Function (CMD / E: on, CMD / E: off)](/img/2b/4495a6cd41a2dd4e7a20ee60b398c9.png)
[Batch dos - cmd Command - Summary and Summary] - cmd extension Command, extension Function (CMD / E: on, CMD / E: off)

LabVIEW generate application (exe) and installer
![不同路径II[针对DFS的动态规划改进]](/img/bb/1e1cee22b9de954de242d299a1a0eb.png)
不同路径II[针对DFS的动态规划改进]

鸿蒙页面菜单的选择

Cocos learning diary 3 - API acquisition nodes and components

Explain distributed raft with dynamic diagram
随机推荐
PI Ziheng embedded: This paper introduces the multi-channel link mode of i.mxrt timer pit and its application in coremark Test Engineering
Common functions of OrCAD schematic
ELK + filebeat日志解析、日志入库优化 、logstash过滤器配置属性
smartBugs安装小问题总结
Redis learning notes
函数模板_类模板
[batch dos-cmd command - summary and summary] - application startup and call, service and process operation commands (start, call, and)
Estimation of dense forest volume based on LIDAR point cloud with few ground points
Chuantu microelectronics 𞓜 subminiature package isolated half duplex 485 transceiver
C#入门教程
Ns32f103c8t6 can perfectly replace stm32f103c8t6
Cocos学习日记3——api获取节点、组件
Evolution of Alibaba e-commerce architecture
Construction of occupancy grid map
诸葛亮 VS 庞统,拿下分布式 Paxos
useMemo模拟useCallback
Pit encountered by pytorch: why can't l1loss decrease during model training?
威迈斯新能源冲刺科创板:年营收17亿 应收账款账面价值近4亿
【LeetCode】two num·两数之和
Distributed quorum NWR of the alchemy furnace of the Supreme Master