kenriortega / flb_filter_iis

Simple fluentbit filter for IIS logs w3c format using wasm
Apache License 2.0
3 stars 0 forks source link

Wasm `Exception: wasm operand stack overflow` to process IIS log #1

Closed kenriortega closed 11 months ago

kenriortega commented 11 months ago

Error on docker compose console Exception: wasm operand stack overflow


➜  flb_filter_iis git:(main) ✗ docker compose up
[+] Running 1/1
 ✔ Container fluent-bit  Recreated                                                            0.1s 
Attaching to fluent-bit
fluent-bit  | Fluent Bit v2.1.8
fluent-bit  | * Copyright (C) 2015-2022 The Fluent Bit Authors
fluent-bit  | * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
fluent-bit  | * https://fluentbit.io
fluent-bit  | 
fluent-bit  | 
fluent-bit  | [2023/08/09 16:20:04] [ info] [fluent bit] version=2.1.8, commit=1d83649441, pid=1
fluent-bit  | [2023/08/09 16:20:04] [ info] [storage] ver=1.4.0, type=memory, sync=normal, checksum=off, max_chunks_up=128
fluent-bit  | [2023/08/09 16:20:04] [ info] [cmetrics] version=0.6.3
fluent-bit  | [2023/08/09 16:20:04] [ info] [ctraces ] version=0.3.1
fluent-bit  | [2023/08/09 16:20:04] [ info] [input:tail:tail.0] initializing
fluent-bit  | [2023/08/09 16:20:04] [ info] [input:tail:tail.0] storage_strategy='memory' (memory only)
fluent-bit  | [2023/08/09 16:20:04] [ info] [output:stdout:stdout.0] worker #0 started
fluent-bit  | [2023/08/09 16:20:04] [ info] [http_server] listen iface=0.0.0.0 tcp_port=2020
fluent-bit  | [2023/08/09 16:20:04] [ info] [sp] stream processor started
fluent-bit  | [2023/08/09 16:20:04] [ info] [input:tail:tail.0] inotify_fs_add(): inode=43764514 watch_fd=1 name=/dataset/app.log
fluent-bit  | [2023/08/09 16:20:13] [error] Got exception running wasm code: Exception: wasm operand stack overflow
kenriortega commented 11 months ago

Fixed issue


fluent-bit  | [08:05:12:161 - FFFF97FF5650]: warning: failed to link import function (__wbindgen_placeholder__, __wbindgen_describe)
fluent-bit  | [08:05:12:168 - FFFF97FF5650]: warning: failed to link import function (__wbindgen_placeholder__, __wbindgen_throw)
fluent-bit  | [08:05:12:169 - FFFF97FF5650]: warning: failed to link import function (__wbindgen_externref_xform__, __wbindgen_externref_table_grow)
fluent-bit  | [08:05:12:170 - FFFF97FF5650]: warning: failed to link import function (__wbindgen_externref_xform__, __wbindgen_externref_table_set_null)
fluent-bit  | [0] iis.dataset.app.log: [[1691704788.563356137, {}], {"c_authorization_header"=>"Bearer+token", "c_ip"=>"10.0.0.0", "cs_bytes"=>"1082", "cs_cookie"=>"_ga=GA2.3.499592451.1685996504;+_gid=GA2.3.1209215542.1689808850;+_ga_PC23235C8Y=GS2.3.1689811012.8.0.1689811012.0.0.0", "cs_host"=>"192.168.1.104:13334", "cs_method"=>"GET", "cs_referer"=>"http://192.168.1.104:13334/swagger/index.html", "cs_uri_query"=>"qName=quww", "cs_uri_stem"=>"/api/Site/site-data", "cs_user_agent"=>"Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/114.0.0.0+Safari/537.36+Edg/114.0.1823.82", "date"=>"2023-07-20 17:18:54", "s_computername"=>"WIN-PC1", "s_ip"=>"192.168.1.104", "s_port"=>"13334", "s_sitename"=>"W3SVC279", "sc_bytes"=>"456", "sc_status"=>"200", "source"=>"LogEntryIIS", "tag"=>"iis.dataset.app.log", "time"=>"2023-08-10T21:59:48.563356137 +0000", "time_taken"=>"3131"}]
fluent-bit  | [2023/08/10 21:59:55] [debug] [input:tail:tail.0] scanning path /dataset/*.log
fluent-bit  | [2023/08/10 21:59:55] [debug] [input:tail:tail.0] scan_blog add(): dismissed: /dataset/app.log, inode 43764514
fluent-bit  | [2023/08/10 21:59:55] [debug] [input:tail:tail.0] 0 new files found on path '/dataset/*.log'