This discussion is archived
1 Reply Latest reply: Sep 10, 2013 12:42 AM by Winter Zhang RSS

DB_EVENT_WRITE_FAILED when using DB_DIRECT_DB and/or DB_LOG_DIRECT

Super_Kevin Newbie
Currently Being Moderated

Hi,

I am using db-6.0.20 on debian 7 64bit, build with --enable-o_direct.

When set DB_DIRECT_DB using dbenv::set_flags() and/or DB_LOG_DIRECT dbenv::log_set_config(), I got DB_EVENT_WRITE_FAILED in dbenv::repmgr_start().

It seems that the the address specified in buf and the value specified in count is not suitably aligned to the value requested by O_DIRECT flag.

 

# Log file created/rotated Monday, 9 Sep 13 05:14:05 GMT

[51140/51140] [1378703645.687] [N] [Srv] Server starting up.

[51140/51140] [1378703645.694] [I] [stdout] Server: Terminal output redirected to log.

[51140/51140] [1378703645.695] [E] [stderr] Server pid: 51140

[51140/51140] [1378703645.747] [I] [DB.DbMsg] [1378703645:747728][51140/51140] REP_UNDEF: EID 0 is assigned for site 192.168.101.148:8866

[51140/51140] [1378703645.748] [I] [DB.DbMsg] [1378703645:748012][51140/51140] REP_UNDEF: EID 1 is assigned for site 192.168.101.148:6666

[51140/51140] [1378703645.756] [I] [DB.DbMsg] BDB2525 No log files found

[51140/51140] [1378703645.760] [I] [DB.DbMsg] [1378703645:760280][51140/51140] REP_UNDEF: set membership for 192.168.101.148:8866 4 (was 0)

[51140/51140] [1378703645.760] [I] [DB.DbMsg] [1378703645:760605][51140/51140] REP_UNDEF: Check view.  Exist 0, cb 0

[51140/51140] [1378703645.760] [E] [DB.DbErr] BDB0137 write: 0x7fffffffd430, 1: Invalid argument

[51140/51140] [1378703645.760] [F] [DB.Event] DB_EVENT_WRITE_FAILED

[51140/51140] [1378703645.760] [E] [DB.DbErr] BDB0137 write: 0x7ffff6c8f0c8, 32000: Invalid argument

[51140/51140] [1378703645.760] [F] [DB.Event] DB_EVENT_WRITE_FAILED

[51140/51140] [1378703645.760] [E] [DB.DbErr] BDB0137 write: 0x7ffff6c690d0, 28: Invalid argument

[51140/51140] [1378703645.760] [F] [DB.Event] DB_EVENT_WRITE_FAILED

[51140/51140] [1378703645.760] [E] [DB.DbErr] BDB3673 rep_start: Invalid argument

[51140/51140] [1378703645.762] [E] [DB.DbErr] BDB0137 write: 0x7fffffffd910, 1: Invalid argument

[51140/51140] [1378703645.762] [F] [DB.Event] DB_EVENT_WRITE_FAILED

[51140/51140] [1378703645.762] [E] [DB.DbErr] BDB0137 write: 0x7ffff6c8f0c8, 32000: Invalid argument

[51140/51140] [1378703645.762] [F] [DB.Event] DB_EVENT_WRITE_FAILED

[51140/51140] [1378703645.762] [E] [DB.DbErr] BDB0137 write: 0x7ffff6c690d0, 28: Invalid argument

[51140/51140] [1378703645.762] [F] [DB.Event] DB_EVENT_WRITE_FAILED

[51140/51140] [1378703645.774] [E] [Srv] DbEnv::repmgr_start: Invalid argument

[51140/51140] [1378703645.774] [N] [Srv] Server shutdown done.

 

My settings:

dbenv.set_flags(DB_DIRECT_DB      |

                        DB_REGION_INIT    |

                        DB_TIME_NOTGRANTED,

                        1);

dbenv.log_set_config(DB_LOG_AUTO_REMOVE |

                             DB_LOG_DIRECT      |

                             DB_LOG_ZERO,

                             1);

dbenv.rep_set_config(DB_REP_CONF_BULK           |

                             DB_REP_CONF_LEASE,

                             1);

dbenv.open(db_home.c_str(),

                   DB_PRIVATE   |

                   DB_CREATE    |

                   DB_RECOVER   | DB_FAILCHK  |

                   DB_THREAD    |

                   DB_INIT_REP  |

                   DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN |

                   DB_INIT_MPOOL ,

                   S_IRUSR | S_IWUSR | S_IRGRP);

 

Thanks for any help,

Kevin

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points