{"id":71,"date":"2009-11-06T16:39:13","date_gmt":"2009-11-06T07:39:13","guid":{"rendered":"http:\/\/labo.samuraistyle.org\/wp\/?p=71"},"modified":"2016-10-22T19:39:21","modified_gmt":"2016-10-22T10:39:21","slug":"hobbit","status":"publish","type":"post","link":"https:\/\/labo.samuraistyle.org\/blog\/archives\/71","title":{"rendered":"hobbit"},"content":{"rendered":"<p><a href=\"http:\/\/ymkx.net\/cat63\/linuxnetwork\/hobbit_got_oversize_message.html\">http:\/\/ymkx.net\/cat63\/linuxnetwork\/hobbit_got_oversize_message.html<\/a> \u304b\u3089\u306e\u30b3\u30d4\u30da\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u306a\u3093\u304b\u30a2\u30e9\u30fc\u30c8\u304c\u9001\u3089\u308c\u3066\u304f\u308b\u306a\u3041\u3068\u601d\u3063\u3066\u8abf\u3079\u3066\u307f\u308b\u3068\u3001\u67d0\u30b5\u30fc\u30d0\u306eprocs\u30b9\u30c6\u30fc\u30bf\u30b9\u304c\u7d2b\u8272\u306b\u3002\u304a\u30fc\u3001\u7d2b\u30a2\u30e9\u30fc\u30c8\u306f\u3058\u3081\u3066\u898b\u305f\u30fc\u3002\u3068\u3001\u611f\u52d5\u3057\u3066\u308b\u5834\u5408\u3058\u3083\u306a\u3044\u3001\u539f\u56e0\u7a76\u660e\u306e\u305f\u3081\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30fc\u30d6\u304c\u52d5\u3044\u3066\u3044\u308b\u30b5\u30fc\u30d0\u306b\u6025\u884c\u30fc\u3002\u3067\u3001hobbitclient.log\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u308b\u3068\u3053\u3093\u306a\u30ed\u30b0\u304c\u3002<\/p>\n<pre><code>2007-02-22 10:58:29 Got over-size message, truncating at 528383 bytes (max: 524288)\n2007-02-22 10:58:29 Bad data in channel, skipping it\n2007-02-22 10:58:29 Got over-size message, truncating at 528383 bytes (max: 524288)\n2007-02-22 10:58:29 Dropping (more) garbled data\n2007-02-22 10:58:29 Dropping (more) garbled data\n2007-02-22 10:58:29 Failed to get a message, terminating\n<\/code><\/pre>\n<p>\u3046\u30fc\u3093\u3001\u306a\u3093\u304b\u898b\u899a\u3048\u304c\u3042\u308b\u306a\u3041\u3002\u305d\u3046\u3044\u3048\u3070\u3001\u30b5\u30fc\u30d0\u5074\u3067\u3082\u540c\u3058\u3088\u3046\u306a\u30ed\u30b0\u304chobbitd.log\u306b\u51fa\u3066\u305f\u3002<\/p>\n<pre><code>2007-02-21 17:33:37 Oversize status msg from xxx.xxx.xxx.xxx for xxx:ports truncated (n=518283, limit=262144)<\/code><\/pre>\n<p>\u3053\u306e\u3068\u304d\u306fggl\u3063\u305f\u7d50\u679c\u3001hobbitserver.cfg\u306bMAXMSG_STATUS\u3092\u8a2d\u5b9a\u3057\u3066\u4e00\u4ef6\u843d\u7740\u3057\u3066\u305f\u306e\u3060\u3002\u3058\u3083\u30fc\u3001\u540c\u3058\u3088\u3046\u306b\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30fc\u30d6\u306ehobbitclient.cfg\u306b\u540c\u69d8\u306e\u8a18\u8ff0\u3092\u3057\u3066\u307f\u308b\u3002\u304c\u3001\u72b6\u6cc1\u306f\u5909\u3089\u305a\u76f8\u5909\u308f\u3089\u305a\u540c\u69d8\u306e\u30ed\u30b0\u304c\u306f\u304d\u51fa\u3055\u308c\u307e\u3059\u306a\u3002<\/p>\n<p>\u3044\u308d\u3044\u308dggl\u3063\u3066\u307f\u305f\u3051\u3069\u56de\u7b54\u304c\u898b\u3048\u3066\u3053\u306a\u3044\u3002\u4ed8\u5c5e\u306e\u6587\u7ae0\u3082\u898b\u3066\u307f\u308b\u3051\u3069\u3001\u308f\u304b\u3089\u3093\u3061\u3093\u3002\u306a\u3093\u304b\u3053\u306e\u7d2b\u8272\u306e\u30a2\u30e9\u30fc\u30c8\u306f\u4e0d\u6c17\u5473\u306a\u306e\u3067\uff08\u8d64\u8272\u306e\u5834\u5408\u306f\u4e0d\u6c17\u5473\u3068\u304b\u8a00\u3063\u3066\u308b\u5834\u5408\u3058\u3083\u306a\u3044\u306e\u3060\uff09\u3001\u6c17\u5408\u3044\u3092\u5165\u308c\u3066\u30bd\u30fc\u30b9\u3092\u898b\u3066\u307f\u308b\u3053\u3068\u306b\u3002<\/p>\n<p>\u3067\u3001\u307e\u305a\u306f\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5410\u3044\u3066\u308b\u5f35\u672c\u4eba\u3092\u8abf\u3079\u308b\u3068\u3001hobbitd_worker.c\u3067\u767a\u898b\u3002<\/p>\n<pre><code>if (usedbytes &gt;= maxmsgsize) {\n  \/* Over-size message. Truncate it. *\/\n  errprintf(\"Got over-size message, truncating at %d bytes (max: %d)\\n\", usedbytes, maxmsgsize);\n  endpos = startpos + maxmsgsize;\n  memcpy(endpos, \"\\n@@\\n\", 4); \/* Simulate end-of-message and flush data *\/\n  needmoredata = 0;\n  continue;\n}\n<\/code><\/pre>\n<p>\u30c8\u30ea\u30ac\u30fc\u3068\u306a\u3063\u3066\u308b\u306e\u306fmaxmsgsize\u3067\u3059\u304b\u3001\u305d\u3046\u3067\u3059\u304b\u3002\u3067\u3001\u305d\u3044\u3064\u3092\u8fbf\u308b\u3068\u3001<\/p>\n<pre><code>maxmsgsize = 1024*shbufsz(canid);<\/code><\/pre>\n<p>\u3053\u3093\u306a\u306e\u767a\u898b\u3002\u3055\u3089\u306b\u3001shbufsz\u3092\u63a2\u3057\u3066\u307f\u308b\u3068\u3001\u3053\u3044\u3064\u306fhobbitd_buffer.c\u306b\u3044\u307e\u3057\u305f\u3088\u3002<\/p>\n<pre><code>unsigned int shbufsz(enum msgchannels_t chnid)\n{\n  unsigned int defvalue = 0, result = 0;\n  char *v = NULL;\n  if (chnid != C_LAST) {\n    switch (chnid) {\n      case C_STATUS: v = getenv(\"MAXMSG_STATUS\"); defvalue = 256; break;\n      case C_CLIENT: v = getenv(\"MAXMSG_CLIENT\"); defvalue = 512; break;\n      case C_CLICHG: v = getenv(\"MAXMSG_CLICHG\"); defvalue = shbufsz(C_CLIENT); break;\n      case C_DATA: v = getenv(\"MAXMSG_DATA\"); defvalue = 256; break;\n      case C_NOTES: v = getenv(\"MAXMSG_NOTES\"); defvalue = 256; break;\n      case C_STACHG: v = getenv(\"MAXMSG_STACHG\"); defvalue = shbufsz(C_STATUS); break;\n      case C_PAGE: v = getenv(\"MAXMSG_PAGE\"); defvalue = shbufsz(C_STATUS); break;\n      case C_ENADIS: v = getenv(\"MAXMSG_ENADIS\"); defvalue = 32; break;\n      default: break;\n    }\n    if (v) {\n      result = atoi(v);\n      \/* See if it is an old setting in bytes *\/\n      if (result &gt; 32*1024) result = (result \/ 1024);\n    }\n    if (result &lt; 32) result = defvalue;\n  } else {\n    enum msgchannels_t i;\n    unsigned int isz;\n    result = 0;\n    for (i=C_STATUS; (i &lt; C_LAST); i++) {\n      isz = shbufsz(i);\n      if (isz &gt; result) result = isz;\n    }\n  }\n  return result;\n}\n<\/code><\/pre>\n<p>\u306f\u306f\u30fc\u3093\u3001\u3053\u3093\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3067\u8a2d\u5b9a\u3059\u308b\u306e\u306d\u3002\u3068\u3044\u3046\u308f\u3051\u3067\u30012\u756a\u76ee\u306eMAXMSG_CLIENT\u3092hobbitclient.cfg\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u308b\u3068\u3001\u7121\u4e8b\u89e3\u6c7a\uff5e\u3002<\/p>\n<p>\u3068\u3001\u601d\u3044\u304d\u3084\u3001\u4eca\u5ea6\u306f\u30b5\u30fc\u30d0\u306ehobbitd\u304c\u9ec4\u8272\u30a2\u30e9\u30fc\u30c8\u3002\u3067\u3082\u3063\u3066\u3001\u30b5\u30fc\u30d0\u5074\u306b\u3053\u3093\u306a\u30ed\u30b0\u304c\u3001<\/p>\n<pre><code>2007-02-22 11:55:46 Oversize status msg from xxx.xxx.xxx.xxx for xxx:ports truncated (n=1021699, limit=555008)<\/code><\/pre>\n<p>\u30b5\u30fc\u30d0\u5074\u306b\u9001\u3089\u308c\u308bMSG\u306eMAX\u3092\u632f\u308a\u5207\u3063\u3066\u308b\u307f\u305f\u3044\u3002\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u30b5\u30fc\u30d0\u5074\u306eMAXMSG_STATUS\u3082\u3055\u3089\u306b\u3067\u304b\u304f\u3057\u3066\u307f\u308b\u3002hobbitserver.cfg\u306eMAXMSG_STATUS\u3092\u5909\u66f4\u3057\u3066\u4e00\u4ef6\u843d\u7740\u4e00\u4ef6\u843d\u7740\u3045\u30fc\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/ymkx.net\/cat63\/linuxnetwork\/hobbit_got_oversize_message.html \u304b\u3089\u306e\u30b3\u30d4\u30da\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[11,5],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-tech","tag-hobbit","tag-linux"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":5,"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":957,"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/posts\/71\/revisions\/957"}],"wp:attachment":[{"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labo.samuraistyle.org\/blog\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}