Package lmdb-0.9.29 was installed; and py-lmdb, as a --user install, from PyPi so lmdb can be used from Python3.9.
Behaviour seemed erratic, including segmentation faults, but for a while it seemed possible to avoid these by using alternative methods supported by py-lmdb. Eventually I got stuck and downloaded the project from github.com/jnwatson/py-lmdb/ to try running the address-book example and modify it toward something like the problem case at which I was stuck. Running got a segmentation fault immediately but repeated retries after deleting the *.sem siblings of /tmp/address-book.lmdb got to a case where the run did not give a segmentation fault. The first script below shows this and includes a list of installed packages and dmesg output. The second script below is from an equivalent FreeBSD session and shows the address-book example giving the expected output. I was assuming py-lmdb should just work, but notice FreeBSD has a port but not OpenBSD: so maybe assumption is wrong? Script started on Sat Jan 28 12:59:27 2023 opendev$ uname -a OpenBSD opendev.home 7.2 GENERIC.MP#758 amd64 opendev$ ls /tmp sndio vi.recover opendev$ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py Segmentation fault (core dumped) opendev$ ls /y tmp 2192baec8c73f403a857cb5e31a384a8481d96ab965510ec63ad71da9798c522.sem address-book.lmdb eebfd9cc55a9dc2ab5b13550e78544804307f93944815b7760405d5dfeac1b0f.sem sndio vi.recover opendev$ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py Segmentation fault (core dumped) opendev$ ls /tmp/*.sem /tmp/2192baec8c73f403a857cb5e31a384a8481d96ab965510ec63ad71da9798c522.sem /tmp/eebfd9cc55a9dc2ab5b13550e78544804307f93944815b7760405d5dfeac1b0f.sem opendev$ opendev$ ls /tmp/*.sem /tmp/*.sem /tmp/*.sem r /tmp/*.semm /tmp/*.sem opendev$ opendev$ rm /tmp/*.sem opendev$ ls /tmp/*.sem opendev$ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py DB: home DB: business Updating number for dentist Segmentation fault (core dumped) opendev$ opendev$ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py opendev$ rm /tmp/*.sem opendev$ opendev$ rm /tmp/*.sem opendev$ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py DB: home DB: business Updating number for dentist Deleting number for hospital Home DB is now: b'dentist' b'099991231' Boss telephone number: b'0123151232' Deleting all numbers from business DB: Adding number for recruiter to business DB Business DB is now: b'recruiter' b'04123125324' opendev$ ls /tmp address-book.lmdb sndio vi.recover opendev$ opendev$ opendev$ ls /tmp opendev$ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py DB: home b'recruiter' b'04123125324' DB: business Updating number for dentist Deleting number for hospital Home DB is now: b'dentist' b'099991231' b'recruiter' b'04123125324' Boss telephone number: None Deleting all numbers from business DB: Adding number for recruiter to business DB Business DB is now: b'recruiter' b'04123125324' opendev$ opendev$ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py opendev$ ls /tmp address-book.lmdb sndio vi.recover opendev$ opendev$ cat py-lmdb-py-lmdb_1.4.0/examples/address-book.py import lmdb # Open (and create if necessary) our database environment. Must specify # max_dbs=... since we're opening subdbs. env = lmdb.open('/tmp/address-book.lmdb', max_dbs=10) # Now create subdbs for home and business addresses. home_db = env.open_db(b'home') business_db = env.open_db(b'business') # Add some telephone numbers to each DB: with env.begin(write=True) as txn: txn.put(b'mum', b'012345678', db=home_db) txn.put(b'dad', b'011232211', db=home_db) txn.put(b'dentist', b'044415121', db=home_db) txn.put(b'hospital', b'078126321', db=home_db) txn.put(b'vendor', b'0917465628', db=business_db) txn.put(b'customer', b'0553211232', db=business_db) txn.put(b'coworker', b'0147652935', db=business_db) txn.put(b'boss', b'0123151232', db=business_db) txn.put(b'manager', b'0644810485', db=business_db) # Iterate each DB to show the keys are sorted: with env.begin() as txn: for name, db in ('home', home_db), ('business', business_db): print('DB:', name) for key, value in txn.cursor(db=db): print(' ', key, value) print() # Now let's update some phone numbers. We can specify the default subdb when # starting the transaction, rather than pass it in every time: with env.begin(write=True, db=home_db) as txn: print('Updating number for dentist') txn.put(b'dentist', b'099991231') print('Deleting number for hospital') txn.delete(b'hospital') print() print('Home DB is now:') for key, value in txn.cursor(): print(' ', key, value) print() # Now let's look up a number in the business DB with env.begin(db=business_db) as txn: print('Boss telephone number:', txn.get(b'boss')) print() # We got fired, time to delete all keys from the business DB. with env.begin(write=True) as txn: print('Deleting all numbers from business DB:') txn.drop(business_db, delete=False) print('Adding number for recruiter to business DB') txn.put(b'recruiter', b'04123125324', db=business_db) print('Business DB is now:') for key, value in txn.cursor(db=business_db): print(' ', key, value) print() opendev$ opendev$ opendev$ ls py-lmdb-py-lmdb_1.4.0/examples address-book.py dirtybench.py nastybench.py words.gz dirtybench-gdbm.py keystore parabench.py opendev$ opendev$ ls py-lmdb-py-lmdb_1.4.0 ChangeLog MANIFEST.in docs lib misc tests LICENSE README.md examples lmdb setup.py opendev$ opendev$ opendev$ pkg_info lmdb Information for inst:lmdb-0.9.29 Comment: Symas Lightning Memory-Mapped Database Description: LMDB is an ultra-fast, ultra-compact key-value data store developed by Symas for the OpenLDAP Project. It uses memory-mapped files, so it has the read performance of a pure in-memory database while still offering the persistence of standard disk-based databases, and is only limited to the size of the virtual address space, (it is not limited to the size of physical RAM). LMDB was originally called MDB, but was renamed to avoid confusion with other software associated with the name MDB. Maintainer: Jeremie Courreges-Anglas <j...@wxcvbn.org> WWW: https://symas.com/lmdb/ opendev$ opendev$ opendev$ pkg_info adwaita-icon-theme-42.0 base icon theme for GNOME antiword-0.37p0 converts MSWord Documents to ASCII Text and PostScript apl-fonts-1.0p0 Adrian Smith's standard APL fonts apr-1.7.0 Apache Portable Runtime apr-util-1.6.1p4 companion library to APR aspell-0.60.6.1p11 spell checker designed to eventually replace Ispell at-spi2-atk-2.38.0 atk-bridge for at-spi2 at-spi2-core-2.44.1 service interface for assistive technologies atk-2.38.0 accessibility toolkit used by gtk+ autoconf-2.71 automatically configure source code on many Un*x platforms avahi-glib-0.8p1 GLib and GObject integration libraries for avahi avahi-libs-0.8p2 libraries and common data files for avahi boost-1.80.0p0v0 free peer-reviewed portable C++ source libraries brotli-1.0.9p0 generic lossless compressor bzip2-1.0.8p0 block-sorting file compressor, unencumbered cairo-1.17.6 vector graphics library cdparanoia-3.a9.8p4 CDDA reading utility with extra data verification features cdrtools-3.00p2 ISO 9660 filesystem and CD/DVD/BD creation tools chromium-105.0.5195.125 Chromium browser claws-mail-4.1.0 mail and news client claws-mail-pdfviewer-4.1.0 pdfviewer plugin clucene-core-2.3.3.4p3 full-text search engine library cups-libs-2.4.2 CUPS libraries and headers curl-7.87.0 transfer files with FTP, HTTP, HTTPS, etc. cvsps-2.1p2 generate patchsets from CVS repositories cyrus-sasl-2.1.28 RFC 2222 SASL (Simple Authentication and Security Layer) db-4.6.21p7v0 Berkeley DB package, revision 4 db-tcl-4.6.21p4v0 TCL bindings for Berkeley DB, revision 4 dbus-1.14.0p0v0 message bus system dbus-daemon-launch-helper-1.14.0 DBus setuid helper for starting system services dbus-glib-0.112p0v0 glib bindings for dbus message system dconf-0.40.0 configuration backend system desktop-file-utils-0.26 utilities for dot.desktop entries dvd+rw-tools-7.1p1 mastering tools for DVD+RW/+R/-R/-RW e2fsprogs-1.46.2p0 utilities to manipulate ext2 filesystems ee-1.5.2p2v0 easy to use text editor enchant-1.6.1p3 generic spell checking library enchant2-2.3.3 generic spell checking library evince-42.3-light GNOME document viewer flac-1.3.4p0 free lossless audio codec fribidi-1.0.12 library implementing the Unicode Bidirectional Algorithm gcr-3.41.1 library for bits of crypto UI and parsing gdbm-1.23 GNU dbm gdk-pixbuf-2.42.9p0 image data transformation library geoclue2-2.6.0p2 modular geoinformation service on top of D-Bus gettext-runtime-0.21p1 GNU gettext runtime libraries and programs ghostscript-9.56.1 PostScript and PDF interpreter ghostscript-fonts-8.11p3 35 standard PostScript fonts with Adobe name aliases giflib-5.2.1 tools and library routines for working with GIF images git-2.37.3 distributed version control system glew-2.2.0 GL Extension Wrangler library glib2-2.72.4p2 general-purpose utility library glib2-networking-2.72.2 network-related gio modules for GLib glm-0.9.8.5 C++ mathematics header-only library for OpenGL software gmake-4.3 GNU make gmp-6.2.1p0 library for arbitrary precision arithmetic gnuchess-6.2.9 chess program gnumeric-1.12.53 spreadsheet application for GNOME gnupg-2.2.39 GNU privacy guard - a free PGP replacement gnutls-3.7.7 GNU Transport Layer Security library goffice-0.10.53 document centric objects and utilities gpgme-1.18.0 GnuPG Made Easy graphene-1.10.8 thin layer of graphic data types graphite2-1.3.14 rendering for complex writing systems gsettings-desktop-schemas-42.0 collection of shared GSettings schemas gspell-1.10.0 spell-checking library for GTK+ gstreamer1-1.20.3 framework for streaming media gstreamer1-plugins-base-1.20.3 base elements for GStreamer gstreamer1-plugins-good-1.20.3p0 good elements for GStreamer gtk+3-3.24.34 multi-platform graphical toolkit gtk+3-cups-3.24.34p0 gtk+3 CUPS print backend gtk-update-icon-cache-3.24.34 gtk+ icon theme caching utility gumbo-0.10.1p0 HTML5 parsing library in pure C99 gvfs-1.50.2 GNOME Virtual File System harfbuzz-5.2.0 text shaping library harfbuzz-icu-5.2.0 ICU support for libharfbuzz hicolor-icon-theme-0.17 fallback theme of the icon theme specification hubbub-0.3.7 HTML parser hunspell-1.7.0 spelling, stemming, morphological analysis and generation hyphen-2.8.8 text hyphenation library icu4c-71.1v0 International Components for Unicode ijs-0.35p3 raster image transmission library intel-firmware-20220809v0 microcode update binaries for Intel CPUs inteldrm-firmware-20220913 firmware binary images for inteldrm(4) driver iso-codes-4.11.0 lists of the country, language and currency iso names itcl-3.4.1p2v0 object-oriented extensions to Tcl itk-3.3p5 build mega-widgets using the Itcl object system jbig2dec-0.19 decoder for JBIG2 monochrome hi-res image compression format jpeg-2.1.3v0 SIMD-accelerated JPEG codec replacement of libjpeg json-glib-1.6.6p0 JSON parser for GLib-based libraries and applications lame-3.100p1 lame ain't an MP3 encoder lcms2-2.12 color management library libarchive-3.6.1p0 multi-format archive and compression library libassuan-2.5.5 IPC library used by GnuPG and gpgme libb2-0.98.1v0 library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp libcanberra-0.30p4 implementation of the Freedesktop sound theme spec. libcanberra-gtk3-0.30p9 gtk+3 helper for libcanberra libcss-0.9.1 CSS parser and selection engine libdom-0.4.1 W3C DOM implementation libetpan-1.9.4 mail purpose library libevent-2.1.12 event notification library libexif-0.6.24 extract digital camera info tags from JPEG images libffi-3.4.2 Foreign Function Interface libgcrypt-1.10.1p0 crypto library based on code used in GnuPG libgpg-error-1.45 error codes for GnuPG related software libgsf-1.14.50 GNOME Structured File library libhandy-1.8.0 building blocks for modern adaptive GNOME apps libical-3.0.14 implementation of the iCalendar protocols and data units libiconv-1.17 character set conversion library libidn-1.41 internationalized string handling libidn2-2.3.0p0 implementation of IDNA2008 internationalized domain names libksba-1.6.3 X.509 library libltdl-2.4.2p2 GNU libtool system independent dlopen wrapper libnettle-3.8.1 cryptographic library libnotify-0.8.1 send desktop notifications to a notification daemon libnsbmp-0.1.6 BMP/ICO decoding library libnsgif-0.2.1p0 GIF decoding library libnslog-0.1.3 netsurf logging library libnspsl-0.1.6 public suffix list library for netsurf libnsutils-0.1.0 miscellaneous internal functions for netsurf libogg-1.3.5 Ogg bitstream library libpaper-1.1.28 library for handling paper characteristics libparserutils-0.2.4p0 utility library for parser building libproxy-0.4.18p1 library handling all the details of proxy configuration libpsl-0.21.1 public suffix list library libreoffice-7.4.1.2v0 multi-platform productivity suite librsvg-2.54.5 SAX-based render library for SVG files libsecret-0.20.5p0 library for storing and retrieving passwords and secrets libshout-2.4.5 library for communicating with an icecast server libsndfile-1.1.0 library to handle various audio file formats libsoup-2.74.2 HTTP client/server library for GNOME libsoup3-3.2.0 HTTP client/server library for GNOME libspectre-0.2.10p1 library for rendering Postscript documents libtasn1-4.19.0 Abstract Syntax Notation One structure parser library libtheora-1.2.20190601p0 open video codec libunbound-1.16.3 validating DNS resolver library libunistring-0.9.7 manipulate Unicode strings libusb1-1.0.23p2 library for USB device access from userspace libutf8proc-2.4.0p0 unicode library libv4l-1.20.0p2 libv4l userspace library libvorbis-1.3.7 audio compression codec library libvpx-1.11.0p1v0 Google VP8/VP9 video codec libwapcaplet-0.4.3 string internment library libwebp-1.2.4 Google WebP image format conversion tool libxkbcommon-1.4.1 library to handle keyboard descriptions libxml-2.10.3 XML parsing library libxslt-1.1.37 XSLT C Library for GNOME libyajl-2.1.0 small JSON library written in ANSI C lmdb-0.9.29 Symas Lightning Memory-Mapped Database lz4-1.9.4 fast BSD-licensed data compression lzo2-2.10p2 portable speedy lossless data compression library mariadb-client-10.9.3v1 multithreaded SQL database (client) metaauto-1.0p4 wrapper for gnu auto* motif-2.3.8 Motif toolkit mozilla-dicts-en-GB-1.3p1 en-GB dictionary for Mozilla mpfr-4.1.0 library for multiple-precision floating-point computations mpg123-1.30.1 fast console MPEG audio player and decoder library netsurf-3.10p3 lightweight web browser, with GTK interface nghttp2-1.49.0 library for HTTP/2 noto-emoji-20211101 emoji fonts for the noto font family noto-fonts-20201206 pan-unicode font family npth-1.6 new GNU Portable Threads Library nspr-4.35 Netscape Portable Runtime nss-3.83 libraries to support development of security-enabled apps openh264-2.3.0 Cisco implementation of H.264 codec openjp2-2.5.0 open-source JPEG 2000 codec library openldap-client-2.6.3p0v0 LDAP client library and tools opus-1.3.1 IETF audio codec orc-0.4.32 library and toolset to operate arrays of data p11-kit-0.24.1 library for loading and enumerating PKCS#11 modules p5-Error-0.17029 error/exception handling in an OO-ish way p5-Mail-Tools-2.21p0 modules for handling mail with perl p5-Time-TimeDate-2.33 library for parsing and formatting dates and times pango-1.50.10 library for layout and rendering of text pcre-8.44 perl-compatible regular expression library pinentry-1.2.1 PIN or passphrase entry dialog (ncurses interface) png-1.6.37p0 library for manipulating PNG images poppler-21.12.0p0 PDF rendering library poppler-data-0.4.11 encoding files for poppler poppler-utils-21.12.0 PDF conversion tools and utilities postgresql-client-14.5 PostgreSQL RDBMS (client) py3-MarkupSafe-2.1.1 implements an XML/HTML/XHTML markup safe string py3-alabaster-0.7.12p0 configurable sidebar-enabled Sphinx theme py3-apsw-3.35.4p0 thin SQLite wrapper for Python py3-babel-2.10.3 I18N/L10N tools for Python py3-brotli-1.0.9p2 Python bindings for the Brotli compression library py3-bsddb3-6.0.1p6 Python bindings for Oracle Berkeley DB py3-certifi-2021.10.8p0 Python package to check certificates using the OpenBSD CA py3-chardet-4.0.0p3 character encoding auto-detection in Python py3-charset-normalizer-2.0.12 character set detector library py3-cython-0.29.32v0 optimising static compiler for Python and Cython py3-docutils-0.19 process plaintext documentation into other formats py3-idna-3.3 Python library to support the IDNA protocol py3-imagesize-1.4.1 getting image size from png/jpeg/jpeg2000/gif file py3-importlib_metadata-4.12.0 library providing an API for accessing packages metadata py3-jinja2-3.1.2 fast, optionally sandboxed, Python template engine py3-packaging-21.3 core utilities for Python packages py3-parsing-3.0.9p0 Python parsing module py3-pip-22.2.2 tool for installing Python packages py3-psutil-5.8.0p0 library to retrieve system information and utilisation py3-pygments-2.13.0 Python syntax highlighter py3-requests-2.28.1 elegant and simple HTTP library for Python py3-setuptools-64.0.3v0 simplified packaging system for Python modules py3-snowballstemmer-2.2.0 snowball stemming library collection for Python py3-sphinx-5.1.1 Python documentation generator py3-sphinxcontrib-applehelp-1.0.2p0 sphinx extension to output Apple help books py3-sphinxcontrib-devhelp-1.0.2p0 sphinx extension to output Devhelp documents py3-sphinxcontrib-htmlhelp-2.0.0 sphinx extension to output HTML help files py3-sphinxcontrib-jsmath-1.0.1p0 sphinx extension to render display math in HTML py3-sphinxcontrib-qthelp-1.0.3p0 sphinx extension to output QtHelp documents py3-sphinxcontrib-serializinghtml-1.1.5 sphinx extension to output serialized HTML (json and pickle) py3-sphinxcontrib-websupport-1.2.4p0 integrate Sphinx documentation into your Web application py3-stemmer-2.0.1 snowball stemming algorithms, for information retrieval py3-tz-2022.2.1 Python API for dealing with timezones py3-urllib3-1.26.12 HTTP library for Python py3-wheel-0.37.1 built-package format for Python py3-zipp-3.5.0p0 backport of pathlib-compatible object wrapper for zip files python-3.10.9p0 interpreted object-oriented programming language python-3.9.16 interpreted object-oriented programming language python-idle-3.10.9 IDE for Python python-idle-3.9.16 IDE for Python python-tkinter-3.10.9 Python interface to the Tk graphical toolkit python-tkinter-3.9.16 Python interface to the Tk graphical toolkit python3-3.9p1 meta-package to install the current version of python 3 quirks-6.42 exceptions to pkg_add rules and cache raptor-2.0.15p4 RDF Parser Toolkit for Redland rasqal-0.9.33p3 RDF Query Library for Redland redland-1.0.17p9 high-level interface for RDF rsync-3.2.5pl0 mirroring/synchronization over low bandwidth links serf-1.3.9p0 high performance HTTP client library shared-mime-info-2.2 shared mime database for desktops snappy-1.1.9 fast compression/decompression library sound-theme-freedesktop-0.8p0 XDG sound theme speex-1.2.1 patent-free speech codec speexdsp-1.2.1 speech processing DSP library sqlite3-3.39.3 embedded SQL implementation sqlite3-tcl-3.39.2 Tcl bindings for SQLite3 startup-notification-0.12p8 library for tracking application startup stockfish-14.1 open source chess engine subversion-1.14.2 subversion revision control system taglib-1.12 managing meta-data of audio formats tcl-8.5.19p6 Tool Command Language tcl-8.6.12 Tool Command Language texlive_synctex-2021 synctex for TeXLive typesetting distribution tiff-4.4.0p2 tools and library routines for working with TIFF images tk-8.5.19p2 graphical toolkit for Tcl tk-8.6.12 graphical toolkit for Tcl tnef-1.4.12p1 decode MS-TNEF MIME attachments twolame-0.4.0 optimised MPEG Audio Layer 2 (MP2) encoder unrar-6.12v2 extract, list, and test RAR archives unzip-6.0p16 extract, list & test files in a ZIP archive wavpack-5.5.0 audio codec for lossless, lossy and hybrid compression webkitgtk40-2.38.3 GTK+ port of the WebKit (4.0) rendering engine webkitgtk41-2.38.3 GTK+ port of the WebKit (4.1) rendering engine woff2-1.0.2p0 Web Open Font Format 2.0 library xdg-utils-1.1.3.20210805 utilities to assist desktop integration tasks xpdf-3.04p2v0 PDF viewer for X11 xz-5.2.5p2 LZMA compression and decompression tools yelp-42.2 GNOME help browser yelp-xsl-42.1 XSLT stylesheets for yelp zip-3.0p1 create/update ZIP files compatible with PKZip(tm) zstd-1.5.2 zstandard fast real-time compression algorithm opendev$ opendev$ opendev$ opendev$ dmesg OpenBSD 7.2 (GENERIC.MP) #758: Tue Sep 27 11:57:54 MDT 2022 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 17028485120 (16239MB) avail mem = 16495009792 (15730MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe9fb0 (80 entries) bios0: vendor Hewlett-Packard version "786G2 v02.03" date 10/19/2015 bios0: Hewlett-Packard HP Compaq 6000 Pro SFF PC acpi0 at bios0: ACPI 1.0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC ASF! MCFG TCPA SLIC HPET acpi0: wakeup devices PCI0(S4) COM1(S4) PEG1(S4) PEG2(S4) IGBE(S4) PCX1(S4) PCX2(S4) PCX5(S4) PCX6(S4) HUB_(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) USB6(S3) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 2926.06 MHz, 06-17-0a cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 3MB 64b/line 12-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges cpu0: apic clock running at 266MHz cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 2926.01 MHz, 06-17-0a cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 3MB 64b/line 12-way L2 cache cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins, remapped acpimcfg0 at acpi0 acpimcfg0: addr 0xf4000000, bus 0-63 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEG1) acpiprt2 at acpi0: bus -1 (PEG2) acpiprt3 at acpi0: bus 32 (PCX1) acpiprt4 at acpi0: bus 48 (PCX2) acpiprt5 at acpi0: bus -1 (PCX5) acpiprt6 at acpi0: bus -1 (PCX6) acpiprt7 at acpi0: bus 16 (HUB_) acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001 acpicmos0 at acpi0 com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo "PNP0003" at acpi0 not configured tpm0 at acpi0 TPM_ 1.2 (TIS) addr 0x4e/0x2, device 0xffffffff rev 0xff acpibtn0 at acpi0: PBTN "PNP0C14" at acpi0 not configured acpicpu0 at acpi0: !C3(100@50 mwait.1@0x30), !C2(500@17 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: !C3(100@50 mwait.1@0x30), !C2(500@17 mwait.1@0x10), C1(1000@1 mwait.1), PSS cpu0: Enhanced SpeedStep 2926 MHz: speeds: 2933, 2128, 1596 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Q45 Host" rev 0x03 inteldrm0 at pci0 dev 2 function 0 "Intel Q45 Video" rev 0x03 drm0 at inteldrm0 intagp0 at inteldrm0 agp0 at intagp0: aperture at 0xe0000000, size 0x10000000 inteldrm0: apic 1 int 16, G45, gen 4 "Intel Q45 Video" rev 0x03 at pci0 dev 2 function 1 not configured "Intel Q45 HECI" rev 0x03 at pci0 dev 3 function 0 not configured puc0 at pci0 dev 3 function 3 "Intel Q45 KT" rev 0x03: ports: 16 com com4 at puc0 port 0 apic 1 int 17: ns16550a, 16 byte fifo com4: probed fifo depth: 15 bytes em0 at pci0 dev 25 function 0 "Intel ICH10 D BM LM" rev 0x02: apic 1 int 19, address 78:e3:b5:ca:fa:e3 uhci0 at pci0 dev 26 function 0 "Intel 82801JD USB" rev 0x02: apic 1 int 20 uhci1 at pci0 dev 26 function 1 "Intel 82801JD USB" rev 0x02: apic 1 int 21 uhci2 at pci0 dev 26 function 2 "Intel 82801JD USB" rev 0x02: apic 1 int 22 ehci0 at pci0 dev 26 function 7 "Intel 82801JD USB" rev 0x02: apic 1 int 22 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 azalia0 at pci0 dev 27 function 0 "Intel 82801JD HD Audio" rev 0x02: apic 1 int 21 azalia0: codecs: Realtek ALC662 audio0 at azalia0 ppb0 at pci0 dev 28 function 0 "Intel 82801JD PCIE" rev 0x02 pci1 at ppb0 bus 32 ppb1 at pci0 dev 28 function 1 "Intel 82801JD PCIE" rev 0x02: apic 1 int 21 pci2 at ppb1 bus 48 uhci3 at pci0 dev 29 function 0 "Intel 82801JD USB" rev 0x02: apic 1 int 20 uhci4 at pci0 dev 29 function 1 "Intel 82801JD USB" rev 0x02: apic 1 int 21 uhci5 at pci0 dev 29 function 2 "Intel 82801JD USB" rev 0x02: apic 1 int 22 ehci1 at pci0 dev 29 function 7 "Intel 82801JD USB" rev 0x02: apic 1 int 20 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb2 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xa2 pci3 at ppb2 bus 16 pcib0 at pci0 dev 31 function 0 "Intel 82801JD LPC" rev 0x02 ahci0 at pci0 dev 31 function 2 "Intel 82801JD AHCI" rev 0x02: apic 1 int 18, AHCI 1.2 ahci0: port 0: 3.0Gb/s ahci0: port 1: 3.0Gb/s ahci0: port 2: 3.0Gb/s ahci0: port 3: 3.0Gb/s scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, KINGSTON SA400S3, S3E0> naa.50026b778495498a sd0: 114473MB, 512 bytes/sector, 234441648 sectors, thin sd1 at scsibus1 targ 1 lun 0: <ATA, KINGSTON SA400S3, S3E0> naa.50026b7784986b90 sd1: 114473MB, 512 bytes/sector, 234441648 sectors, thin sd2 at scsibus1 targ 2 lun 0: <ATA, CT240BX500SSD1, M6CR> naa.500a0751e6400397 sd2: 228936MB, 512 bytes/sector, 468862128 sectors, thin sd3 at scsibus1 targ 3 lun 0: <ATA, CT240BX500SSD1, M6CR> naa.500a0751e64003a7 sd3: 228936MB, 512 bytes/sector, 468862128 sectors, thin usb2 at uhci0: USB revision 1.0 uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci1: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci2: USB revision 1.0 uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb5 at uhci3: USB revision 1.0 uhub5 at usb5 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb6 at uhci4: USB revision 1.0 uhub6 at usb6 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb7 at uhci5: USB revision 1.0 uhub7 at usb7 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard pcppi0 at isa0 port 0x61 spkr0 at pcppi0 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets sd4 at scsibus3 targ 1 lun 0: <OPENBSD, SR RAID 1, 006> sd4: 114473MB, 512 bytes/sector, 234441056 sectors sd5 at scsibus3 targ 2 lun 0: <OPENBSD, SR RAID 1, 006> sd5: 228936MB, 512 bytes/sector, 468861536 sectors root on sd4a (e1e37bd2277d58fa.a) swap on sd4b dump on sd4b WARNING: clock gained 2 days WARNING: CHECK AND RESET THE DATE! inteldrm0: 1024x768, 32bpp wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) syncing disks... done rebooting... OpenBSD 7.2 (GENERIC.MP) #758: Tue Sep 27 11:57:54 MDT 2022 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 17028485120 (16239MB) avail mem = 16494997504 (15730MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe9fb0 (80 entries) bios0: vendor Hewlett-Packard version "786G2 v02.03" date 10/19/2015 bios0: Hewlett-Packard HP Compaq 6000 Pro SFF PC acpi0 at bios0: ACPI 1.0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC ASF! MCFG TCPA SLIC HPET acpi0: wakeup devices PCI0(S4) COM1(S4) PEG1(S4) PEG2(S4) IGBE(S4) PCX1(S4) PCX2(S4) PCX5(S4) PCX6(S4) HUB_(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) USB6(S3) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 2926.09 MHz, 06-17-0a cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 3MB 64b/line 12-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges cpu0: apic clock running at 266MHz cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 2926.01 MHz, 06-17-0a cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 3MB 64b/line 12-way L2 cache cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins, remapped acpimcfg0 at acpi0 acpimcfg0: addr 0xf4000000, bus 0-63 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEG1) acpiprt2 at acpi0: bus -1 (PEG2) acpiprt3 at acpi0: bus 32 (PCX1) acpiprt4 at acpi0: bus 48 (PCX2) acpiprt5 at acpi0: bus -1 (PCX5) acpiprt6 at acpi0: bus -1 (PCX6) acpiprt7 at acpi0: bus 16 (HUB_) acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001 acpicmos0 at acpi0 com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo "PNP0003" at acpi0 not configured tpm0 at acpi0 TPM_ 1.2 (TIS) addr 0x4e/0x2, device 0xffffffff rev 0xff acpibtn0 at acpi0: PBTN "PNP0C14" at acpi0 not configured acpicpu0 at acpi0: !C3(100@50 mwait.1@0x30), !C2(500@17 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: !C3(100@50 mwait.1@0x30), !C2(500@17 mwait.1@0x10), C1(1000@1 mwait.1), PSS cpu0: Enhanced SpeedStep 2926 MHz: speeds: 2933, 2128, 1596 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Q45 Host" rev 0x03 inteldrm0 at pci0 dev 2 function 0 "Intel Q45 Video" rev 0x03 drm0 at inteldrm0 intagp0 at inteldrm0 agp0 at intagp0: aperture at 0xe0000000, size 0x10000000 inteldrm0: apic 1 int 16, G45, gen 4 "Intel Q45 Video" rev 0x03 at pci0 dev 2 function 1 not configured "Intel Q45 HECI" rev 0x03 at pci0 dev 3 function 0 not configured puc0 at pci0 dev 3 function 3 "Intel Q45 KT" rev 0x03: ports: 16 com com4 at puc0 port 0 apic 1 int 17: ns16550a, 16 byte fifo com4: probed fifo depth: 0 bytes em0 at pci0 dev 25 function 0 "Intel ICH10 D BM LM" rev 0x02: apic 1 int 19, address 78:e3:b5:ca:fa:e3 uhci0 at pci0 dev 26 function 0 "Intel 82801JD USB" rev 0x02: apic 1 int 20 uhci1 at pci0 dev 26 function 1 "Intel 82801JD USB" rev 0x02: apic 1 int 21 uhci2 at pci0 dev 26 function 2 "Intel 82801JD USB" rev 0x02: apic 1 int 22 ehci0 at pci0 dev 26 function 7 "Intel 82801JD USB" rev 0x02: apic 1 int 22 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 azalia0 at pci0 dev 27 function 0 "Intel 82801JD HD Audio" rev 0x02: apic 1 int 21 azalia0: codecs: Realtek ALC662 audio0 at azalia0 ppb0 at pci0 dev 28 function 0 "Intel 82801JD PCIE" rev 0x02 pci1 at ppb0 bus 32 ppb1 at pci0 dev 28 function 1 "Intel 82801JD PCIE" rev 0x02: apic 1 int 21 pci2 at ppb1 bus 48 uhci3 at pci0 dev 29 function 0 "Intel 82801JD USB" rev 0x02: apic 1 int 20 uhci4 at pci0 dev 29 function 1 "Intel 82801JD USB" rev 0x02: apic 1 int 21 uhci5 at pci0 dev 29 function 2 "Intel 82801JD USB" rev 0x02: apic 1 int 22 ehci1 at pci0 dev 29 function 7 "Intel 82801JD USB" rev 0x02: apic 1 int 20 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb2 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xa2 pci3 at ppb2 bus 16 pcib0 at pci0 dev 31 function 0 "Intel 82801JD LPC" rev 0x02 ahci0 at pci0 dev 31 function 2 "Intel 82801JD AHCI" rev 0x02: apic 1 int 18, AHCI 1.2 ahci0: port 0: 3.0Gb/s ahci0: port 1: 3.0Gb/s ahci0: port 2: 3.0Gb/s ahci0: port 3: 3.0Gb/s scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, KINGSTON SA400S3, S3E0> naa.50026b778495498a sd0: 114473MB, 512 bytes/sector, 234441648 sectors, thin sd1 at scsibus1 targ 1 lun 0: <ATA, KINGSTON SA400S3, S3E0> naa.50026b7784986b90 sd1: 114473MB, 512 bytes/sector, 234441648 sectors, thin sd2 at scsibus1 targ 2 lun 0: <ATA, CT240BX500SSD1, M6CR> naa.500a0751e6400397 sd2: 228936MB, 512 bytes/sector, 468862128 sectors, thin sd3 at scsibus1 targ 3 lun 0: <ATA, CT240BX500SSD1, M6CR> naa.500a0751e64003a7 sd3: 228936MB, 512 bytes/sector, 468862128 sectors, thin usb2 at uhci0: USB revision 1.0 uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci1: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci2: USB revision 1.0 uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb5 at uhci3: USB revision 1.0 uhub5 at usb5 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb6 at uhci4: USB revision 1.0 uhub6 at usb6 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb7 at uhci5: USB revision 1.0 uhub7 at usb7 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard pcppi0 at isa0 port 0x61 spkr0 at pcppi0 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets sd4 at scsibus3 targ 1 lun 0: <OPENBSD, SR RAID 1, 006> sd4: 114473MB, 512 bytes/sector, 234441056 sectors sd5 at scsibus3 targ 2 lun 0: <OPENBSD, SR RAID 1, 006> sd5: 228936MB, 512 bytes/sector, 468861536 sectors root on sd4a (e1e37bd2277d58fa.a) swap on sd4b dump on sd4b inteldrm0: 1024x768, 32bpp wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) opendev$ opendev$ opendev$ exit Script done on Sat Jan 28 13:12:32 2023 Script started on Sat Jan 28 13:20:25 2023 $ uname -a FreeBSD freedev.home 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64 $ ls /tmp $ python3.9 py-lmdb-py-lmdb_1.4.0/examples/address-book.py DB: home b'dad' b'011232211' b'dentist' b'044415121' b'hospital' b'078126321' b'mum' b'012345678' DB: business b'boss' b'0123151232' b'coworker' b'0147652935' b'customer' b'0553211232' b'manager' b'0644810485' b'vendor' b'0917465628' Updating number for dentist Deleting number for hospital Home DB is now: b'dad' b'011232211' b'dentist' b'099991231' b'mum' b'012345678' Boss telephone number: b'0123151232' Deleting all numbers from business DB: Adding number for recruiter to business DB Business DB is now: b'recruiter' b'04123125324' $ ls /tmp address-book.lmdb $ $ cat py-lmdb-py-lmdb_1.4.0/examples/address-book.py import lmdb # Open (and create if necessary) our database environment. Must specify # max_dbs=... since we're opening subdbs. env = lmdb.open('/tmp/address-book.lmdb', max_dbs=10) # Now create subdbs for home and business addresses. home_db = env.open_db(b'home') business_db = env.open_db(b'business') # Add some telephone numbers to each DB: with env.begin(write=True) as txn: txn.put(b'mum', b'012345678', db=home_db) txn.put(b'dad', b'011232211', db=home_db) txn.put(b'dentist', b'044415121', db=home_db) txn.put(b'hospital', b'078126321', db=home_db) txn.put(b'vendor', b'0917465628', db=business_db) txn.put(b'customer', b'0553211232', db=business_db) txn.put(b'coworker', b'0147652935', db=business_db) txn.put(b'boss', b'0123151232', db=business_db) txn.put(b'manager', b'0644810485', db=business_db) # Iterate each DB to show the keys are sorted: with env.begin() as txn: for name, db in ('home', home_db), ('business', business_db): print('DB:', name) for key, value in txn.cursor(db=db): print(' ', key, value) print() # Now let's update some phone numbers. We can specify the default subdb when # starting the transaction, rather than pass it in every time: with env.begin(write=True, db=home_db) as txn: print('Updating number for dentist') txn.put(b'dentist', b'099991231') print('Deleting number for hospital') txn.delete(b'hospital') print() print('Home DB is now:') for key, value in txn.cursor(): print(' ', key, value) print() # Now let's look up a number in the business DB with env.begin(db=business_db) as txn: print('Boss telephone number:', txn.get(b'boss')) print() # We got fired, time to delete all keys from the business DB. with env.begin(write=True) as txn: print('Deleting all numbers from business DB:') txn.drop(business_db, delete=False) print('Adding number for recruiter to business DB') txn.put(b'recruiter', b'04123125324', db=business_db) print('Business DB is now:') for key, value in txn.cursor(db=business_db): print(' ', key, value) print() $ $ $ pkg info lmdb lmdb-0.9.29_1,1 Name : lmdb Version : 0.9.29_1,1 Installed on : Sat Jan 28 11:16:40 2023 UTC Origin : databases/lmdb Architecture : FreeBSD:13:amd64 Prefix : /usr/local Categories : databases Licenses : OPENLDAP Maintainer : delp...@freebsd.org WWW : https://symas.com/lmdb/ Comment : OpenLDAP Lightning Memory-Mapped Database Shared Libs provided: liblmdb.so.0 Annotations : FreeBSD_version: 1301000 repo_type : binary repository : FreeBSD Flat size : 673KiB Description : LMDB is an ultra-fast, ultra-compact key-value data store developed by Symas for the OpenLDAP Project. It uses memory-mapped files, so it has the read performance of a pure in-memory database while still offering the persistence of standard disk-based databases, and is only limited to the size of the virtual address space, (it is not limited to the size of physical RAM). LMDB was originally called MDB, but was renamed to avoid confusion with other software associated with the name MDB. WWW: https://symas.com/lmdb/ $ $ exit Script done on Sat Jan 28 13:23:07 2023