[Rspamd-Users] Head wall - wall head.. Bug or problem between chair and keyboard?

Michelle Sullivan michelle at isux.com
Wed Sep 17 05:26:55 UTC 2025


Either I’m being really thick or I’ve found a bug..

I’ve added a line of code for logging only to lua_redis.lua at line 1772 to show what has been passed because well just wanted to be sure it was getting that far (that modification is below just so people don’t think that’s it)..

Sep 17 15:12:08 thunderhawk rspamd[12309]: <kpmerx>; lua; url_check...:45: Starting redis check with https://simplified-rules-283808.framer.app/
Sep 17 15:12:08 thunderhawk rspamd[12309]: <kpmerx>; lua; url_check...:52: url_check setting key to: RS_urlrdir-6zqoy1ro9f9zeb1hx8yi (https://simplified-rules-283808.framer.app/)
Sep 17 15:12:08 thunderhawk rspamd[12309]: <6c75ab>; lua; url_check...:55: Sending Redis request: {[1] = GET, [2] = RS_urlrdir-6zqoy1ro9f9zeb1hx8yi}
Sep 17 15:12:08 thunderhawk rspamd[12309]: <6c75ab>; lua; lua_redis.lua:1772: redis request looks like: cmd=GET, args={[1] = RS_urlrdir-6zqoy1ro9f9zeb1hx8yi}
Sep 17 15:12:08 thunderhawk rspamd[59446]: <704b11>; main; rspamd_srv_handler: cannot read from worker's srv pipe connection closed; command = health


Calling code is:

        h = hash.create()
        h:update(url)
        local redis_key = settings['redis_prefix'] .. '-' .. h:base32():sub(1, 20)
        rspamd_logger.infox(rspamd_config, '%s setting key to: %s (%s)', N, redis_key, url)

        local req = { 'GET', redis_key }
        rspamd_logger.infox(task, "Sending Redis request: %s", req)
        -- get key syncronously
        ret, data = lua_redis.request(
            redis_params, -- connect params
            { task = task },
            req
          )

        if ret then


That extra line at lua_redis.lua:1772 is:

    -- Coroutines version
    lutil.debugm(N, 'perform generic coroutine request to redis server' ..
        ' (host=%s, timeout=%s): cmd: %s, arguments: %s', addr,
        opts.timeout, opts.cmd, opts.args)
    local ret, conn = rspamd_redis.connect_sync(opts)
    if not ret then
      logger.errx(log_obj, 'cannot execute redis request')
      addr:fail()
    else
      logger.infox(log_obj, 'redis request looks like: cmd=%s, args=%s', opts.cmd, opts.args)
      conn:add_cmd(opts.cmd, opts.args)
      return conn:exec()
    end
    return false, nil, addr 
  end
end

If I use lua.redis.redis_make_request with a callback and the data there it works no issue… so I know it’s not the connection to the redis server, however I need to do a synchronous call in this instance because I’m already in at least one callback and am just checking to see if this has already been seen and is available on the redis server.

Regards,

Michelle


More information about the Users mailing list